Theming own components #997
Replies: 4 comments 4 replies
-
Found a third way, so far easiest for me to use:
|
Beta Was this translation helpful? Give feedback.
-
Thanks - what about if we want to create components that have their own variants (i.e. buttons-like). Wouldn't it make sense to make |
Beta Was this translation helpful? Give feedback.
-
I ended up doing something like this too. Any thoughts on "variants" of your own custom components? E.g., I have a Snackbar component, and it has an
And I theme it like this:
But it seems there should be a more elegant way; at the very least, it would be nice to add my "variant" modifications (like SnackbarError) inside of my main Even better would be the ability, sort of like @atanasster alludes to above to be able to totally customize this, so an implementation could look like
And then calling Snackbar would simply be
Any thoughts on this, @atanasster or @hasparus ? Maybe there's something similar already in theme-ui that I'm unaware of? |
Beta Was this translation helpful? Give feedback.
-
Hey, I'm trying to make Table, Td, Th,... etc. They aren't in theme-ui's components package. If I use a variant, values from the variant win over values the caller passes in with |
Beta Was this translation helpful? Give feedback.
-
Hi,
What is the recommended way to add own components to the Theme object
Box
@theme-ui/css
Thanks
Beta Was this translation helpful? Give feedback.
All reactions