-
-
Notifications
You must be signed in to change notification settings - Fork 430
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
Create custom style prop or more prop to customize style #79
Comments
I think there's too many possibilities to add options as unique props, but we definitely need an "escape hatch" to override After you brought that up on Discord, I found this: https://github.com/richardgill/tailwind-override which I think we can use to add that escape hatch. That would make it so |
@tulup-conner how about this? https://github.com/ben-rogerson/twin.macro tailwind-override doesn't seem to be updated anymore |
Yeah, tailwind-override isn't the best option for that reason and because it seems to have some outstanding unfixed bugs. They also chose to use regex to parse class names which inflated the bundle size. Twin brings in a lot of dependencies and unrelated functionality. The dependencies thing is something we really want to avoid. This isn't really my area of expertise, so I'm doing the same thing you are, looking around for libraries that have done it right already. The actual maintainers of this project are actively trying to solve this as well so I'm sure we'll get there. |
See #160, it's in draft right now. It just occurred to me that there are probably situations where you might want to add a |
So cool !! const theme = {
button: {
base: 'w-full',
},
}; or should like this? const theme = {
button: {
base: 'group flex h-min w-full items-center justify-center p-0.5 text-center font-medium focus:z-10',
},
}; |
@emewjin the second option. 'Cause you will always complete overwrite the style that you are customizing on your own theme. |
We should document that behavior for sure ^ |
Is your feature request related to a problem? Please describe.
I add
w-full
class on Button component to use it by full width, but internal classw-fit
ignore it.Describe the solution you'd like
maybe 2 option (just suggestion). Also, I think other components will need this option too.
width
prop on Button component. then user can customize button component's widthAdditional context
discord thread
The text was updated successfully, but these errors were encountered: