npm.io
1.0.6 • Published 2 years ago

@types/storybook-react-router

Licence
MIT
Version
1.0.6
Deps
4
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/storybook-react-router

Summary

This package contains type definitions for storybook-react-router (https://github.com/gvaldambrini/storybook-router).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/storybook-react-router.

index.d.ts

import { DecoratorFunction, StoryApi } from "@storybook/addons";
import { StoryFnReactReturnType } from "@storybook/react/dist/ts3.9/client/preview/types";
import { ComponentType } from "react";
import { MemoryRouterProps } from "react-router";

export const StoryRouter: ComponentType<{
    story: StoryApi;
    links: object;
    routerProps: MemoryRouterProps;
}>;

declare function storyRouterDecorator(
    links?: object,
    routerProps?: MemoryRouterProps,
): DecoratorFunction<StoryFnReactReturnType>;

export default storyRouterDecorator;

Additional Details

Credits

These definitions were written by Alex Lomia.