Installation
yarn add storybook-addon-emotion-theme --dev
Add to .storybook/addons.js
;
addDecorator to .storybook/config.js
;; const themes = theme1 theme2;;
or
addDecorator to stories
; const themes = theme1 theme2; ;
Reminder
Make sure every theme has a name
property. For example:
const myTheme = {
name: "Light",
primaryColor: "blue"
}
This is used for displaying in the Storybook UI.
Contributing
yarn
yarn build
yarn example
Thanks
Thanks to Carlos for making storybook-addon-styled-component-theme upon which this library was based on top of.