import React from 'react'; import { StyleSheet, TextInput, TouchableOpacity, Text, View, TextInputProps, Keyboard, NativeSyntheticEvent, TextInputSubmitEditingEventData, } from 'react-native'; import Animated from 'react-native-reanimated'; import Icon from 'react-native-vector-icons/Feather'; import {normalize} from 'react-native-elements'; const AnimatedIcon = Animated.createAnimatedComponent(Icon); interface SearchBarProps extends TextInputProps { onCancel: () => void; top: Animated.Value; } const SearchBar: React.FC = ({ onFocus, onBlur, onChangeText, value, onCancel, style, }) => { const handleSubmit = ( e: NativeSyntheticEvent, ) => { e.preventDefault(); Keyboard.dismiss(); }; return ( Cancel ); }; const styles = StyleSheet.create({ container: { height: 40, flexDirection: 'row', justifyContent: 'center', alignItems: 'stretch', zIndex: 2, }, inputContainer: { flexGrow: 1, flexDirection: 'row', alignItems: 'center', paddingHorizontal: 8, borderRadius: 20, backgroundColor: '#F0F0F0', }, searchIcon: { marginRight: 8, }, input: { flex: 1, fontSize: 16, color: '#828282', letterSpacing: normalize(0.5), }, cancelButtonView: {width: 70, flexDirection: 'row', justifyContent: 'center'}, cancelButton: { position: 'absolute', height: '100%', justifyContent: 'center', paddingHorizontal: 5, }, cancelText: { color: '#818181', fontWeight: '600', }, }); export default SearchBar;