ActionMenu
frontend-react/src/components/ui/ActionMenu.tsx
Dropdown (•••) menu for table row actions. Solves UI clutter from many inline row buttons.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
items | ActionMenuItem[] | — | Menu items (label, icon, onClick, danger?) |
align | left | right | right | Dropdown alignment |
trigger | ReactNode | ••• button | Custom trigger element |
ActionMenuItem shape
ts
{ label: string; icon?: ReactNode; onClick: () => void; danger?: boolean }Usage
tsx
<ActionMenu items={[
{ label: 'Editar', onClick: () => edit(row) },
{ label: 'Excluir', onClick: () => del(row), danger: true },
]} />Notes
- Closes on click-outside and Escape key
danger: truerenders label in red