Switch component
Switch
/components
const [isEnabled, setIsEnabled] = useState(false); const toggleSwitch = () => setIsEnabled(previousState => !previousState); export default function switch() { return ( <Switch trackColor={{ false: "#d1d5db", true: "#AAB2FF" }} thumbColor={isEnabled ? "#AA8CFF" : "#f9fafb"} onValueChange={toggleSwitch} value={isEnabled} /> ) }