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
First of all, thank you so much for making this library, great stuff!
Is there currently a way to get Styled Component variant type definitions? Not sure if I am doing something wrong. Take a simple button using the traditional Vanilla Extract Recipe.
constButtonWithRecipe=recipe({base: {backgroundColor: 'gainsboro',borderRadius: '9999px',},variants: {sm: {padding: '12px'},md: {padding: '16px'},},});//When using the RecipeVariants import the correct type is returnedexporttypeButtonRecipeVariants=RecipeVariants<typeofButtonWithRecipe>;
When recreating that same thing as a Styled Component I am having trouble getting the correct type definitions.
constStyledButton=styled('button',{base: {backgroundColor: 'gainsboro',borderRadius: '9999px',fontSize: '13px',border: '0',},variants: {sm: {padding: '12px'},md: {padding: '16px'},},});//I am able to get type definitions for the _entire_ component including DOM props with the following, exporttypeWithDOMProps=React.ComponentProps<typeofStyledButton>;//With the provided StyleVariants import the style always returns "type StyledButtonVariants = unknown"exporttypeStyledButtonVariants=StyleVariants<typeofButtonWithRecipe>;
The text was updated successfully, but these errors were encountered:
First of all, thank you so much for making this library, great stuff!
Is there currently a way to get Styled Component variant type definitions? Not sure if I am doing something wrong. Take a simple button using the traditional Vanilla Extract Recipe.
When recreating that same thing as a Styled Component I am having trouble getting the correct type definitions.
The text was updated successfully, but these errors were encountered: