Button
frontend-react/src/components/ui/Button.tsx
Unified button with 6 variants, loading state, and accessible min-height (44px mobile).
Props
| Prop | Type | Default | Description |
|---|---|---|---|
variant | primary | secondary | danger | ghost | icon | table-action | primary | Visual style |
size | sm | md | lg | md | Size preset |
loading | boolean | false | Shows spinner, disables button |
tenantColor | string | #C5A059 | Override primary color |
...rest | HTMLButtonAttributes | — | Forwarded to <button> |
Usage
tsx
<Button variant="primary" onClick={save}>Salvar</Button>
<Button variant="danger" loading={deleting}>Excluir</Button>
<Button variant="table-action">•••</Button>Notes
table-actionusespx-3 py-1.5 text-xs(~36px height — acceptable in dense table rows)iconvariant: square button for icon-only actionsprimaryadopts--color-tenantCSS token for brand color