import React from 'react'; import { StyleSheet, TextInput, View, Switch } from 'react-native'; import { ListItem } from '@rneui/themed'; import { useTheme } from './themes'; import loc from '../loc'; interface SettingsBlockExplorerCustomUrlItemProps { isCustomEnabled: boolean; onSwitchToggle: (value: boolean) => void; customUrl: string; onCustomUrlChange: (url: string) => void; onSubmitCustomUrl: () => void; inputRef?: React.RefObject; } const SettingsBlockExplorerCustomUrlItem: React.FC = ({ isCustomEnabled, onSwitchToggle, customUrl, onCustomUrlChange, onSubmitCustomUrl, inputRef, }) => { const { colors } = useTheme(); return ( <> {loc.settings.block_explorer_preferred} {isCustomEnabled && ( )} ); }; export default SettingsBlockExplorerCustomUrlItem; const styles = StyleSheet.create({ container: { minHeight: 60, paddingVertical: 10, }, title: { fontSize: 16, fontWeight: '500', }, uriContainer: { flexDirection: 'row', borderWidth: 1, borderRadius: 4, marginHorizontal: 15, marginVertical: 10, paddingHorizontal: 10, alignItems: 'center', }, uriText: { flex: 1, minHeight: 36, }, });