import {Platform, Pressable} from 'react-native' import {Switch as PaperSwitch, Text, useTheme} from 'react-native-paper' import {MARGIN} from './constants' export default function Switch({ value, onChange, children, }: { value?: boolean onChange: (value: boolean) => void children: string }) { const {colors} = useTheme() return ( onChange(!value)} style={{ flexDirection: 'row', flexWrap: 'wrap', alignItems: 'center', marginBottom: Platform.OS === 'ios' ? MARGIN : null, }}> {children} ) }