Variant groups? #192
theoephraim
started this conversation in
Ideas
Replies: 1 comment
-
approve, must! name like before: after: need only change to multiple grids and add headers: hi @Akryum maybe it's not too hard to implement? |
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
-
Just starting to get set up and already thinking another level of hierarchy might be useful in some situations.
For example, lets say my button component has some props, like type (primary, secondary, error, etc), size (s, m, l, etc), style (solid, outline, transparent)
Of course having a single sort of "playground" story that uses the controls and can do anything is awesome. But I also want to show all various options grouped together somehow.
One option is to have a single story called "sizes" which has one button of each size it. That works, but probably best to keep a single button per "Variant". Problem is I'd like those size related variants grouped together somehow, but ideally not split into a new story that is only about button sizes.
Perhaps introducing a new concept of a "variant group" could be helpful. In a grid view, each group could be displayed slightly split from one another, or could even show the secondary nav like when viewing single stories.
Open to other ideas, or patterns others have found useful.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions