-
-
Save chulanovskyi/dcb8908b336f1e57e52f2a34b13cfff0 to your computer and use it in GitHub Desktop.
storybook config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { configure, addDecorator } from '@storybook/react'; | |
import { addParameters } from '@storybook/react'; | |
import { create } from '@storybook/theming'; | |
import { withInfo } from '@storybook/addon-info'; | |
import { withKnobs } from '@storybook/addon-knobs'; | |
import '../src/style.sass'; | |
addParameters({ | |
options: { | |
theme: create({ | |
base: 'light', | |
brandTitle: 'Brand', | |
brandUrl: 'https://www.brand-url.com/' | |
}) | |
} | |
}); | |
addDecorator(withInfo({ inline: true, source: false })); | |
addDecorator(withKnobs); | |
const req = require.context('../src', true, /\.stories\.tsx$/); | |
function loadStories() { | |
req.keys().forEach(req); | |
} | |
configure(loadStories, module); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment