import React from 'react'; import { Switch, View, StyleSheet, Text } from 'react-native'; interface SwitchContainerProps { title: string; onValueChange: () => void; value: boolean; enabled?: boolean; } export default function SwitchContainer({ title, onValueChange, value, enabled = true, }: SwitchContainerProps) { return enabled ? ( {title} onValueChange()} trackColor={{ true: 'green', false: 'red' }} /> ) : null; } const styles = StyleSheet.create({ switchContainer: { margin: 5, flexDirection: 'row', justifyContent: 'space-between', }, });