reactjs - Cómo cambiar el color del borde del control deslizante del componente principal de switch en React
Al presionar el pulgar del interruptor de React Native, me da el color predeterminado en lugar del color del borde del pulgar, debería ser cercano al naranja. ¿Cómo eliminarlo y sustituir el color?
import React, { FunctionComponent } from 'react';
import { Switch, View } from 'react-native';
import { useTheme } from 'react-native-paper';
interface IMSwitchProps {
toggleValue: boolean;
onToggleChange: (value?: any) => void;
disableSwitch?: boolean;
testId?: string;
}
const IMSwitch: FunctionComponent<IMSwitchProps> = (props: IMSwitchProps) => {
const theme = useTheme();
return (
<View>
<Switch
value={props.toggleValue}
onValueChange={(value) => {
props.onToggleChange(value);
}}
trackColor={{
false: props.disableSwitch ? theme.Palette.grey[100] : theme.Palette.grey[500],
true: props.disableSwitch ? theme.Palette.grey[100] : theme.Palette.IMPrimary.border,
}}
thumbColor={
props.disableSwitch
? theme.Palette.background
: props.toggleValue
? theme.Palette.IMPrimary.main
: theme.Palette.background
}
disabled={props.disableSwitch}
testID={props.testId}
/>
</View>
);
};
export default IMSwitch;
intentado dando estilo para cambiar