-
Notifications
You must be signed in to change notification settings - Fork 924
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with Tailwind CSS Styling Integration in React Project #7750
Comments
Hi there Tldr you just need to configure the tailwind config in your react app, in the same way as you configured it in your bit env. Longer explanation: Hope that helps |
no @benjgil, I have created Tailwind components and they display correctly, so there's no issue with my Tailwind configuration in the React project. However, specifically for the components from Bit, Tailwind fails to render its class styling. |
Describe the bug
I created a Bit React project using the following command:
bit new react my-proj -a teambit.react/react-env -d my.scope
Afterward, I customized my own environment and integrated Tailwind CSS into it, allowing the components to seamlessly work with Tailwind styling.
I successfully developed the components, and they worked flawlessly even after exporting them to Bit Cloud. The preview displayed correct styling with proper Tailwind integration.
However, when I integrated the components into my ReactJS project by installing the package using yarn, I encountered an issue. The Tailwind CSS styling did not integrate properly, resulting in missing styles. As a result, the components appeared unstyled (please refer to the attached screenshot).
I am wondering if there's an error in the process of installing and integrating the components into my React project. Your assistance in resolving this matter would be greatly appreciated.
Steps to Reproduce
bit new react my-proj -a teambit.react/react-env -d my.scope
bit create react-component atoms/title
, ensuring proper Tailwind styling.bit tag && bit export
yarn add @my.scope/my-comp1
yarn dev
Expected Behavior
My expectation is that the Tailwind class styling is implemented effectively.
Screenshots, exceptions, and logs
Specifications
The text was updated successfully, but these errors were encountered: