ButtonGroup
A button group: it lines up several Button elements so adjacent ones connect head-to-tail into a single block.
Basic usage
Mixing in toggle buttons
A group can hold both plain buttons and ToggleButton elements, common in editor toolbars.
Group-level disable
Setting disabled on the group propagates it to every button inside, so you don't have to set each one.
Difference from the original
The original propagates the group's disabled state by imperatively updating each child button; this library passes disabled down through a React context — the equivalent declarative convenience. A button's effective disabled is the OR of its own state and its group's.
API
See also
- Buttons within the group: Button, ToggleButton
- Common pass-through and
refrules: Common props