What is the strategy for common component? #4897
Unanswered
devhyunjae
asked this question in
Help
Replies: 1 comment 2 replies
-
I use it two ways mainly. I pass the className before my default classes so they have higher specificity and overrides default ones. Make sure to use the right typings so you'll get Tailwind hints when writing the classes if you're using the extension.
Another option is to create lookup tables so you can keep inputs consistent. You can even use both together.
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Demo
https://codesandbox.io/s/tailwindcss-react-boilerplat-forked-riz53?file=/src/components/app.js
question
Hi guys, I want to know what is the best practices when making common component via tailwindcss
example common
<Card />
componentusing card component
rendered result
I made 2 options to add custom css styling
Any good ideas?
Beta Was this translation helpful? Give feedback.
All reactions