import { SegmentedButton, SingleChoiceSegmentedButtonRow, Text } from "@expo/ui/jetpack-compose"; import { defaultMinSize, fillMaxWidth } from "@expo/ui/jetpack-compose/modifiers"; import { useAppearancePreferences } from "../features/settings/appearance/AppearancePreferencesProvider"; import { useScaledTextRole } from "../features/settings/appearance/useScaledTextRole"; import type { SegmentedControlProps } from "./SegmentedControl.types"; /** Compose content shared by screen controls and native dialogs, inside their existing Host. */ export function MaterialSegmentedButtons( props: SegmentedControlProps, ) { const { themeVariables: colors } = useAppearancePreferences(); const typography = useScaledTextRole("footnote"); return ( {props.options.map((option) => ( props.onSelect(option.value)} modifiers={[defaultMinSize({ minHeight: 48 })]} colors={{ activeContainerColor: colors["--color-secondary"], activeContentColor: colors["--color-secondary-foreground"], inactiveContainerColor: "transparent", inactiveContentColor: colors["--color-foreground"], activeBorderColor: colors["--color-border"], inactiveBorderColor: colors["--color-border"], }} > {option.label} ))} ); }