-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Open
Description
Is your feature request related to a problem? Please describe
I'm converting dynamic knobs to controls in prep for 7.0 knob deprecation. Some of our more complex stories require more than one condition for some controls.
Adding more than one conditional in this way is not a valid solution.
{
"control": {
"type": "select"
},
"name": "Slides per view",
"options": {
"2": 2,
"3": 3,
"4": 4,
"5": 5,
"1 (default)": 1
},
if: { arg: 'type', eq: 'carousel'},
if: { arg: 'carouseleffect', eq: 'slide'},
],
"table": {
"category": "Carousel"
}
}
Describe the solution you'd like
I would like the ability to assign array of objects to 'if' rather than object. If conditions within the array should be logically ANDed.
Suggestion for solution
{
"control": {
"type": "select"
},
"name": "Slides per view",
"options": {
"2": 2,
"3": 3,
"4": 4,
"5": 5,
"1 (default)": 1
},
"if": [
{
"arg": "type",
"eq": "carousel"
},
{
"arg": "carouseleffect",
"eq": "slide"
}
],
"table": {
"category": "Carousel"
}
}
Describe alternatives you've considered
I've considered splitting the situations into different stories, but this would alter the story experience.
Are you able to assist to bring the feature to reality?
yes, I can
Additional context
No response
macabeus, divisnotabutton, Sddoo, ryuran, Dorio-Schibsted and 40 moredivisnotabutton, jaxonL, surin-0, jessepinho, telfDavid and 8 more