Storybook addon to add styles to preview window
npm install --save-dev storybook-addon-styles
yarn add storybook-addon-styles --dev
withStyles decorator, either in your global config file, or to a group of stories.
;// ...rest of your configuration
Or to individual stories:
// Add 40px of padding just in this story
You can also add parameters in your global config file to add styles to all stories. You can still override these styles later with parameters in individual stories if you need to.
;// Add styles as options when adding the decorator...// ...and/or with parameters// ...rest of your configuration
storybook-addon-styles is currently supported in React and Vue. Feel free to add an issue if you'd like support for another framework.