Autotyping for both slots and className #43
omarkhatibco
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.
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to share with you how you could build a component and allow the user to easily override the types without having to type each
className
for each slot.so I have this tv function, we will export both CircularProgressVariants and CircularProgressSlots
note here that the slots are exported using
typeof circularProgressStyleFn.slots
now your component should look like this:
now the type of className would be
and if there are no slots you could omit
CircularProgressSlots
andclassName
would beClassValue
Beta Was this translation helpful? Give feedback.
All reactions