Segmented Switch
SegmentedSwitch
Section titled “SegmentedSwitch”export function SegmentedSwitch<T extends SegmentedSwitchValue = SegmentedSwitchValue>(;SegmentedSwitchRenderable
Section titled “SegmentedSwitchRenderable”export type SegmentedSwitchRenderable = any;SegmentedSwitchValue
Section titled “SegmentedSwitchValue”export type SegmentedSwitchValue = string | number;SegmentedSwitchOption
Section titled “SegmentedSwitchOption”export type SegmentedSwitchOption<T extends SegmentedSwitchValue = SegmentedSwitchValue> = { value: T; label: SegmentedSwitchRenderable; count?: number | string; title?: string; ariaLabel?: string; disabled?: boolean; className?: string; testId?: string;};SegmentedSwitchRole
Section titled “SegmentedSwitchRole”export type SegmentedSwitchRole = 'tablist' | 'radiogroup' | 'group';SegmentedSwitchProps
Section titled “SegmentedSwitchProps”export type SegmentedSwitchProps<T extends SegmentedSwitchValue = SegmentedSwitchValue> = { value: T; options: SegmentedSwitchOption<T>[]; onChange: (value: T, option: SegmentedSwitchOption<T>) => void; ariaLabel?: string; className?: string; itemClassName?: string; countClassName?: string; activeClassName?: string; disabled?: boolean; role?: SegmentedSwitchRole; testId?: string; renderOption?: (option: SegmentedSwitchOption<T>, state: { active: boolean; disabled: boolean }) => SegmentedSwitchRenderable; renderCount?: (option: SegmentedSwitchOption<T>, state: { active: boolean; disabled: boolean }) => SegmentedSwitchRenderable;};