Skip to content

Latest commit

History

History
7 lines (4 loc) 路 908 Bytes

STORYBOOK-CONFIG.md

File metadata and controls

7 lines (4 loc) 路 908 Bytes

Configuring Storybook

Storybook Native can be used either as a build tool, or as a React component library that manages switching between stories.

You must create a .storybook folder with a main.js file inside of it, where you must configure the path to your stories, as well as any addons you want to use. The @storybook/addon-docs and @storybook/addon-controls addons must always be included. The @storybook/native-addon addon is required if you want to be able to rotate the emulator, capture screenshots, or switch between devices. Here is an example of a valid main.js file.

To enable switching between devices, you must also create a preview.js file in your .storybook folder, with the contents found here