Component Local Variants #268
kennetpostigo
started this conversation in
Ideas
Replies: 2 comments
-
|
Hey, yeah this is a good idea! Currently we have this API: styled(View)((props: { color?: 'violet' }) => ({
...(props.color == 'violet' && { bg: 'blueviolet' })
}))But I suppose a more dedicated variants API could be useful too. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Hello, happy new Year! |
Beta Was this translation helpful? Give feedback.
0 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.
-
Hi 👋,
I started using
dripsyrecently and I saw variants as part of the theme API and I thought that was tight! However, one thing that I think would also add extra flexibility is the ability to create component-local variants usingstyled().Something like:
Stitches has a wonderful
variantsapi, that a few styling libraries have copied over likevanilla-extract, etc. I think it would be nice to have something like this indripsytoo.Is this something the
dripsyteam might consider adding in the future?Beta Was this translation helpful? Give feedback.
All reactions