Conditional logic on component panel toggles

Would like to apply conditional expressions to component changes from the right panel.

In this case, if user turns off items I would like the appropriate bars to be removed.

No bars on ends
One bar in-between each item