1import React from 'react'; 2import { PixelRatio, Switch, Text, View } from 'react-native'; 3 4interface Props { 5 onToggle: (value: boolean) => void; 6 title?: string; 7 disabled?: boolean; 8 toggled: boolean; 9} 10 11export const AndroidImplementationSelector = ({ 12 title = 'Android Implementation', 13 disabled = false, 14 toggled = false, 15 onToggle, 16}: Props) => { 17 return ( 18 <View style={{ marginTop: 5 }}> 19 <View 20 style={{ 21 flexDirection: 'row', 22 alignItems: 'center', 23 justifyContent: 'space-between', 24 paddingVertical: 5, 25 borderBottomWidth: 1.0 / PixelRatio.get(), 26 borderBottomColor: '#cccccc', 27 }}> 28 <Text style={{ flex: 1, fontSize: 16 }}>{title}</Text> 29 <Switch disabled={disabled} value={toggled} onValueChange={onToggle} /> 30 </View> 31 </View> 32 ); 33}; 34