1import React from 'react'; 2import {SwitchProps} from 'react-native'; 3import useColors from '@/hooks/useColors'; 4import {Switch} from 'react-native-paper'; 5 6interface ISwitchProps extends SwitchProps {} 7export default function ThemeSwitch(props: ISwitchProps) { 8 const colors = useColors(); 9 return ( 10 <Switch 11 {...props} 12 trackColor={{ 13 false: colors.textSecondary, 14 true: colors.textHighlight ?? '#eba0b3', 15 }} 16 onValueChange={props.onValueChange ?? undefined} 17 /> 18 ); 19} 20