Usage
Direct children of this component can be any types buttons or groups of
buttons.
<.toolbar label="Actions for the dog">
<div role="group">
<button phx-click="feed-dog">
<.icon text="Feed dog"><Icons.feed /></.icon>
</button>
<button phx-click="walk-dog">
<.icon text="Walk dog"><Icons.walk /></.icon>
</button>
</div>
<div role="group">
<button phx-click="teach-trick">
<.icon text="Teach a Trick"><Icons.teach /></.icon>
</button>
<button phx-click="groom-dog">
<.icon text="Groom dog"><Icons.groom /></.icon>
</button>
</div>
</.toolbar>
This component needs the Doggo.Toolbar JavaScript hook. See
Phoenix LiveView Hooks for
registering it.
Keyboard
Left and Right - move between the controls, wrapping at the ends. A
toolbar with orientation="vertical" uses Up and Down instead.
Home and End - first and last control.
The toolbar is a single tab stop. Tab moves to the control the user last
used, and the arrow keys move between them.