You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm building a simple button component with a SVA recipe with a variant of size. I would like to document the size variant using JSDoc. However, it doesn't appear it's possible when using RecipeVariantProps to include code comments within the recipe.
As a workaround, I've exported the recipe's props using the RecipeVariantProps type utility and marked it as NonNullable.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm building a simple button component with a SVA recipe with a variant of
size
. I would like to document thesize
variant using JSDoc. However, it doesn't appear it's possible when usingRecipeVariantProps
to include code comments within the recipe.As a workaround, I've exported the recipe's props using the
RecipeVariantProps
type utility and marked it asNonNullable
.This allows me to create an interface that extends from the
ButtonRecipeVariantProps
.❓Is there a better way to go about doing this? How are others solving this. Thank you.
Beta Was this translation helpful? Give feedback.
All reactions