Because conditions can be quite complex, involving 3–4 input fields and the ability to use AND/OR logic with multiple conditions, I propose introducing a new Condition
prop that works similarly to the Link
and Icon
props.
I’d also be fine with being able to set conditions per instance (i.e., having the Conditions button available), but doing it via a prop would allow setting a default condition and, more importantly, setting conditions for any element inside the component. There are also cases where you might want to define a default condition, override it per instance, or even disable the condition entirely and simply show the element without it needing to fulfill any condition.
I’ve submitted an idea board entry, but it hasn’t been published or approved yet.