Open History to see the last commit
1import { Platform, Switch, type SwitchProps } from "react-native";
2
3export function ThemedSwitch(props: SwitchProps) {
4 return (
5 <Switch
6 {...props}
7 ios_backgroundColorClassName="accent-switch-inactive-track"
8 thumbColorClassName={
9 Platform.OS === "android"
10 ? props.value
11 ? "accent-switch-active-thumb"
12 : "accent-switch-inactive-thumb"
13 : undefined
14 }
15 trackColorOffClassName="accent-switch-inactive-track"
16 trackColorOnClassName="accent-switch-active-track"
17 />
18 );
19}