Badge
Etiqueta de estado con ocho tipos de color, tres tamaños e icono opcional. `outlined` invierte fondo y texto.
import Badge from '#LibComponents/astronative/atomic/Badge/Badge.astro';hola
type="info"hola
type="normal"hola
type="success"hola
type="warning"hola
type="error"hola
type="important"hola
type="suggestion"hola
type="tip"Comparte el azul de `info`.
hola
type="error" iconName="home"hola
type="error" iconName="home" outlined={true}hola
type="info" size="sm"hola
type="info" size="lg"<AC.Badge message="Confirmada" type="success" iconName="check" />Props del tipo del componente
| Prop | Tipo | Obligatorio | Default | Descripción |
|---|---|---|---|---|
ariaLabel | string | no | — | |
class | string | no | — | |
iconName | string | no | — | |
message | string | sí | — | |
outlined | boolean | no | — | |
size | 'sm' | 'md' | 'lg' | no | — | |
type | 'normal' | 'warning' | 'success' | 'error' | 'info' | 'important' | 'suggestion' | 'tip' | no | — |
Ojo
- El icono va en `iconName`. Las stories antiguas pasaban `icon`, que el componente ignora: el icono no se pintaba.
- No confundir con el `Badge` de React: es otro componente, con otros tipos (`light`, `plate`, `amber` en vez de `normal`) y otro reparto de colores.