revamping variants or creating a new one #1901
Unanswered
MuhammadJamaluddin
asked this question in
Q&A
Replies: 1 comment
-
Remapping internal variants is not supported; for that custom a use case you’ll need to build your own components. For your own components, you can make them accept a variant prop, then render variant={`componentVariants.${props.variant}`} |
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.
-
How could I remap built-in variants? for example, the
IconButton
variants are defined in thetheme.buttons
object, what if I wanted to define them in a separatetheme.iconButton
?& what about non-built-in components as well? Let's say I have a component
Component
& I want to define its variants withintheme.componentVariants
... how can I do that?Beta Was this translation helpful? Give feedback.
All reactions