import React from 'react'; import { StyleSheet, TextInput, View, TouchableOpacity } from 'react-native'; import { ListItem as RNElementsListItem } from '@rneui/themed'; import { useTheme } from './themes'; import loc from '../loc'; interface SettingsBlockExplorerCustomUrlListItemProps { title: string; customUrl?: string; onCustomUrlChange?: (url: string) => void; onSubmitCustomUrl?: () => void; selected: boolean; onPress: () => void; checkmark?: boolean; isLoading?: boolean; onFocus?: () => void; onBlur?: () => void; inputRef?: React.RefObject; } const SettingsBlockExplorerCustomUrlListItem: React.FC = ({ title, customUrl, onCustomUrlChange, onSubmitCustomUrl, selected, onPress, checkmark = false, isLoading = false, onFocus, onBlur, inputRef, }) => { const { colors } = useTheme(); const styleHook = StyleSheet.create({ uri: { borderColor: colors.formBorder, borderBottomColor: colors.formBorder, backgroundColor: colors.inputBackgroundColor, }, containerStyle: { backgroundColor: colors.background, minHeight: selected ? 140 : 60, }, checkmarkContainer: { justifyContent: 'center', alignItems: 'center', }, checkmarkStyle: { backgroundColor: 'transparent', borderWidth: 0, }, }); return ( {title} {checkmark && ( )} {selected && ( )} ); }; const styles = StyleSheet.create({ title: { fontSize: 16, fontWeight: '500', }, uri: { flexDirection: 'row', borderWidth: 1, borderBottomWidth: 0.5, minHeight: 44, height: 44, alignItems: 'center', borderRadius: 4, }, uriText: { flex: 1, color: '#81868e', marginHorizontal: 8, minHeight: 36, height: 36, }, }); export default SettingsBlockExplorerCustomUrlListItem;