Simplify button components styles and variants #3085
onyedikachi23
started this conversation in
Ideas
Replies: 0 comments
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.
-
I've used Shadcn ui before coming to React Native, and trying Gluestack ui. So, I tried using the button components from gluestack, but the composition of variants was unnecessarily complex, compared to how it looks like in Shadcn ui button.
Using just the
variant
prop is enough. Because I'm always thinking about when to use whichvariant
with whichaction
.For a quick grasp, here's my refactored version (
Shadcn style
):When compared with the original styles from gluestack, you can see that this is unnecessarily complex:
While this is not a big deal, my suggestion is that using the Shadcn like composition of the variants is much easier to work with.
Beta Was this translation helpful? Give feedback.
All reactions