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
-
Hi 👋,
I started using
dripsy
recently 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
variants
api, that a few styling libraries have copied over likevanilla-extract
, etc. I think it would be nice to have something like this indripsy
too.Is this something the
dripsy
team might consider adding in the future?Beta Was this translation helpful? Give feedback.
All reactions