Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

On a build folder, the tailwind styles are not getting applied to files inside .storybook folder #5

Open
jayaramkasi opened this issue Aug 23, 2021 · 2 comments

Comments

@jayaramkasi
Copy link
Contributor

jayaramkasi commented Aug 23, 2021

Working fine in dev

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.

Content of Layout.js

export default Layout = ({ children }) => (
  <div className="p-0 md:p-4 dark:bg-gray-800 text-gray-900 dark:text-gray-50 max-w-full">
    {children}
  </div>
);
@ghost
Copy link

ghost commented Feb 22, 2022

Tailwind styles are applied here. But dark mode doesn't work in build mode. Is there any troubleshooting on this issue?

@jayaramkasi
Copy link
Contributor Author

jayaramkasi commented Mar 3, 2022

My bad. That's what I meant.

Code repository: https://github.com/Pikkol/wolffia-ui

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant