The issue
After running npm run build-storybook, and serving the folder locally start-storybook -s storybook-static, tailwind's dark mode is not getting applied in the .storybook folder. Works fine for the components inside the src/ folder though
** The code structure
I have a Layout.js file where all my page styles are applied including dark mode. This is passed inside preview.js as a prop to addDecorator.
Layout.js also imports a styles.css file, applying styles here seems to be working. However, inline classNames in Layout.js doesn't seem to be working.
Working fine in dev
The issue After running
npm run build-storybook
, and serving the folder locallystart-storybook -s storybook-static
, tailwind's dark mode is not getting applied in the .storybook folder. Works fine for the components inside the src/ folder though** The code structure I have a Layout.js file where all my page styles are applied including dark mode. This is passed inside preview.js as a prop to addDecorator.
Layout.js also imports a
styles.css
file, applying styles here seems to be working. However, inline classNames in Layout.js doesn't seem to be working.Content of Layout.js