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 think it would great if we could extend from an array components instead of a single component. This would make it possible create reusable patterns that can be combined to form more complex components and reduce code duplication and the need for overrides of inherited variants, compoundVariants, etc that can come from extending from a large component that has a lot of props.
For example:
constbuttonVariants=tv({extend: [actionVariants,boxColorVariants,boxRadiusVariants]variants: {// custom button variants},compoundVariants: [// compound variants for custom button variants and inherited variants from action and box variants (i.e solid colors, outline colors, text sizes, etc)]})
Did anyone else think about adding a similar feature before? Curious about the feasibility of something like this or if there's another pattern that can be used to achieve the same result.
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 think it would great if we could extend from an array components instead of a single component. This would make it possible create reusable patterns that can be combined to form more complex components and reduce code duplication and the need for overrides of inherited variants, compoundVariants, etc that can come from extending from a large component that has a lot of props.
For example:
Did anyone else think about adding a similar feature before? Curious about the feasibility of something like this or if there's another pattern that can be used to achieve the same result.
Beta Was this translation helpful? Give feedback.
All reactions