Catalog Buttons

<.action>

ConnieUI.Buttons

HEEx
<ConnieUI.Buttons.actions id="catalog-action">
  <ConnieUI.Buttons.action click={JS.push("edit")}>Edit</ConnieUI.Buttons.action>
  <ConnieUI.Buttons.action click={JS.push("delete")}>Delete</ConnieUI.Buttons.action>
</ConnieUI.Buttons.actions>

Controls

This component has no attributes the panel can set.

Set by the example

click

Docs

One verb in an `actions/1` row. Carries `data-item` like every other thing in a popover, so the popover's own focus handling reaches it: the arrows move between these, and the pointer highlights them by that same route rather than by a `hover:` rule of its own. Clicking closes the popover, which is what every menu item here does. A `div` rather than `button/1`, following `Dropdowns.item/1`. The popover simulates focus instead of moving it: focus stays on the popover, which passes a `data-focused` attribute between its `[data-item]` children and calls `.click()` on whichever holds it. A real button would therefore still need the marker, since nothing in that machinery consults `document.activeElement`. Using native focus here means rewriting the popover's focus management, and with it every menu in the app, rather than changing this component.
Attribute Type Default Description
click {:struct, Phoenix.LiveView.JS} nil
Slot Slot attributes Description
inner_block *