Button
4 variantesBotón de acción. Tres tipos (primary, primary-reverse, secondary), tres tamaños e icono opcional a izquierda o derecha. Con `href` se pinta como enlace.
import Button from '#LibComponents/astronative/atomic/Button/Button.astro';actionType="primary"actionType="primary" size="sm"actionType="primary" size="lg"actionType="secondary"actionType="primary-reverse"icon="home" iconPosition="left"icon="home" iconPosition="right"label={undefined} icon="home" round="full"href="#" label="Ir al detalle"<AC.Button label="Buscar" actionType="primary" size="md" />Props del tipo del componente
| Prop | Tipo | Obligatorio | Default | Descripción |
|---|---|---|---|---|
class | string | no | — | |
callbackEvent | string | no | — | |
href | string | no | — | |
icon | string | no | — | |
iconPosition | 'left' | 'right' | no | — | |
isFilled | boolean | no | — | |
label | string | no | — | |
actionType | 'primary' | 'primary-reverse' | 'secondary' | 'light' | 'info' | 'danger' | 'none' | no | — | |
type | 'submit' | 'reset' | 'button' | no | — | |
size | 'sm' | 'md' | 'lg' | '2xl' | no | — | |
round | 'none' | 'sm' | 'lg' | 'xl' | '2xl' | 'full' | 'square' | no | — |
Variantes
Button tiene cuatro variantes:
- actionType — primary, primary-reverse, secondary
- size — sm, md, lg
- round — sm, lg, xl, 2xl, full, square
- icon + iconPosition — left, right, o solo icono sin label