@storybook/router
- Version 6.5.16
- Published
- 212 kB
- 5 dependencies
- MIT license
Install
npm i @storybook/router
yarn add @storybook/router
pnpm add @storybook/router
Overview
Core Storybook Router
Index
Variables
Functions
Interfaces
Type Aliases
Variables
variable BaseLocationProvider
const BaseLocationProvider: ({ basename: basenameProp, children, location: locationProp, navigationType, navigator, static: staticProp,}: R.RouterProps) => any;
variable DEEPLY_EQUAL
const DEEPLY_EQUAL: Symbol;
variable Link
const Link: { ({ to, children, ...rest }: LinkProps): JSX.Element; displayName: string;};
variable Location
const Location: { ({ children }: LocationProps): JSX.Element; displayName: string };
variable LocationProvider
const LocationProvider: ({ basename, children, window,}: R.BrowserRouterProps) => JSX.Element;
variable Match
const Match: { ({ children, path: targetPath, startsWith }: MatchProps): JSX.Element; displayName: string;};
variable Route
const Route: { ({ path, children, startsWith, hideOnly }: RouteProps): JSX.Element; displayName: string;};
Functions
function buildArgsParam
buildArgsParam: (initialArgs: Args, args: Args) => string;
function deepDiff
deepDiff: (value: any, update: any) => any;
function getMatch
getMatch: (current: string, target: string, startsWith?: any) => Match | null;
function parsePath
parsePath: (path: string | undefined) => StoryData;
function queryFromLocation
queryFromLocation: (location: Partial<Location>) => Query;
function queryFromString
queryFromString: (s: string) => Query;
function stringifyQuery
stringifyQuery: (query: Query) => string;
function useNavigate
useNavigate: () => (to: string | number, { plain, ...options }?: any) => void;
Interfaces
interface Args
interface Args {}
index signature
[key: string]: any;
interface LinkProps
interface LinkProps {}
interface LocationProps
interface LocationProps {}
property children
children: (renderData: RenderData) => ReactNode;
interface MatchingData
interface MatchingData {}
property match
match: null | { path: string;};
interface MatchProps
interface MatchProps {}
property children
children: (matchingData: MatchingData) => ReactNode;
property path
path: string;
property startsWith
startsWith: boolean;
interface Other
interface Other extends StoryData {}
property path
path: string;
property singleStory
singleStory?: boolean;
interface Query
interface Query {}
index signature
[key: string]: any;
interface RouteProps
interface RouteProps {}
property children
children: ReactNode;
property hideOnly
hideOnly?: boolean;
property path
path: string;
property startsWith
startsWith?: boolean;
Type Aliases
type Match
type Match = { path: string;};
type NavigateOptions
type NavigateOptions = ReturnType<typeof R.useNavigate> & { plain?: boolean;};
type RenderData
type RenderData = Pick<RouterData, 'location'> & Other;
type RouterData
type RouterData = { location: Partial<Location>; navigate: ReturnType<typeof useNavigate>;} & Other;
Package Files (1)
Dependencies (5)
Dev Dependencies (8)
Peer Dependencies (2)
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@storybook/router
.
- Markdown[](https://www.jsdocs.io/package/@storybook/router)
- HTML<a href="https://www.jsdocs.io/package/@storybook/router"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 3078 ms. - Missing or incorrect documentation? Open an issue for this package.