SelectOption
An option, as HTML's <option>: the value the app keeps, and the label the user reads.
Utilização
Switch between day, week and month
Este tipo é usado por SegmentedControl
import { SegmentedControl, Text, VStack, signal } from 'kuito';
const VIEWS = [
{ value: 'day', label: 'Day' },
{ value: 'week', label: 'Week' },
{ value: 'month', label: 'Month' },
];
export default function Plan() {
const view = signal('week');
return (
<VStack gap={8} padding={16}>
<SegmentedControl label="View" options={VIEWS} value={view} height={32} />
<Text>{view.value}</Text>
</VStack>
);
}Declaração do tipo
export type SelectOption = { value: string; label: string };Membros 2
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
value | string | Sim | — |
label | string | Sim | — |
Gerado a partir das declarações TypeScript públicas: assinaturas, props e predefinições vêm da fonte verificada, as descrições da sua JSDoc. Nenhuma predefinição é inventada.