ServiceSelect
3 variantesimport { ServiceSelect } from '#LibComponents/react/packages/service-select/service-select';<ServiceSelect icon="shield-check" title="Seguro" options={options} i18n={i18n} />Props declaradas en la story
| Prop | Tipo | Obligatorio | Default | Descripción |
|---|---|---|---|---|
icon | string | no | — | Icono Material del badge de la card (p.ej. "shield-check", "headset") |
title | string | no | — | Título de la sección dentro de la card (p.ej. "Seguro") |
options | ServiceSelectOption[] | no | — | Opciones seleccionables: id, title, subtitle, price (string "+X,XX€"; sin price se muestra "Incluido") |
selectedId | string | no | — | id seleccionado (controlado). Si no se pasa, estado interno con la primera opción por defecto |
onChange | (id: string) => void | no | — | Callback al cambiar la opción seleccionada |
i18n | ServiceSelectI18n | no | — | Textos: includedLabel, selectedLabel, selectLabel, perPersonLabel (obligatorios) + moreLabel/lessLabel del colapso mobile (opcionales, defaults ES) |
Variantes
ServiceSelect tiene tres variantes:
- Seguro - Opciones con title/subtitle: Inclusión incluido + PLUS de pago (en mobile ≤900px colapsa con "Ver otras opciones (1)")
- SeguroMultiIncluido - Espejo del dato real de la app: varias opciones todas incluidas (sin price), como las emite el mapper del detalle
- OpcionUnica - Asistencia en destino (uso real en services-section): una sola opción, queda seleccionada, sin toggle