Skip to content
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

Use custom colors from tailwind.config.js in color attribute #62

Closed
tulup-conner opened this issue Apr 24, 2022 · 6 comments
Closed

Use custom colors from tailwind.config.js in color attribute #62

tulup-conner opened this issue Apr 24, 2022 · 6 comments
Labels
🚀 enhancement New feature or request

Comments

@tulup-conner
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
I can't really migrate to flowbite-react without the ability to use custom colors I defined in tailwind.config.js. At the very least, I need an escape hatch in each component (className).

Describe the solution you'd like
I would like to be able to define a color, primary in tailwind.config.js, then use that color in flowbite-react components like so:

<Button color="primary">Hi</Button>

Describe alternatives you've considered
As long as each component provides the ability to directly specify a className, I can do this myself.

Additional context
n/a

@rluders
Copy link
Collaborator

rluders commented Apr 25, 2022

This is something that I want to introduce with this #61: the ability to theme supporting. I'm not sure if there is some workaround... @bacali95 any idea?

@rluders rluders added the 🚀 enhancement New feature or request label Apr 25, 2022
@bacali95
Copy link
Collaborator

Hello there, no there is no workaround for this for now.

@tulup-conner
Copy link
Collaborator Author

If that's the case, I would like to add classNames to Alert, Badge, Button as an escape hatch so users can apply colors themselves.

@tulup-conner
Copy link
Collaborator Author

Related issue: #79

@tulup-conner
Copy link
Collaborator Author

This should be resolved once theme support is added #92. I'll retroactively add an example of how to accomplish the above example.

@tulup-conner
Copy link
Collaborator Author

With #151 we have implemented the first component with theme support that specifically includes the ability to add your own colors.

I will be adding this to buttons this week and will close this with that PR.

@rluders rluders closed this as completed May 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚀 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants