SwitchProps
Props of Switch: its Match branches, and what it shows when none matches.
Verwendung
Select one of several states
Dieser Typ wird verwendet von Switch
import { Match, Switch, Text, signal } from 'kuito';
export function Status() {
const state = signal<'loading' | 'offline' | 'ready'>('loading');
return (
<Switch fallback={<Text>Ready</Text>}>
<Match when={state.value === 'loading'}>
<Text>Loading…</Text>
</Match>
<Match when={state.value === 'offline'}>
<Text>Check your connection</Text>
</Match>
</Switch>
);
}Typdeklaration
export interface SwitchProps extends ElementAttributes {
fallback?: KuitoNode;
/** `Match` elements only. */
children?: KuitoNode;
}Mitglieder 3
Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.