Open History to see the last commit
1import type { ComponentProps } from "react";
2
3import { ThemedSwitch } from "../../../components/ThemedSwitch";
4import { SettingsControlRow } from "./SettingsControlRow";
5
6export function SettingsSwitchRow(
7 props: Omit<ComponentProps<typeof SettingsControlRow>, "children"> & {
8 readonly value: boolean;
9 readonly onValueChange: (value: boolean) => void;
10 },
11) {
12 return (
13 <SettingsControlRow
14 disabled={props.disabled}
15 icon={props.icon}
16 label={props.label}
17 subtitle={props.subtitle}
18 >
19 <ThemedSwitch
20 style={{ alignSelf: "center" }}
21 accessibilityLabel={props.label}
22 disabled={props.disabled}
23 onValueChange={props.onValueChange}
24 value={props.value}
25 />
26 </SettingsControlRow>
27 );
28}