changed name of SearchBar to TextInputBar

This commit is contained in:
Jakob Stornig 2024-01-04 21:47:10 +01:00
parent 5876fcaf8e
commit e1efed5b21
2 changed files with 8 additions and 6 deletions

View file

@ -9,7 +9,7 @@ interface SearchBarProps extends ViewProps {
onChangeText? : (text: string) => void | undefined
}
export default function SearchBar(props: SearchBarProps) {
export default function TextInputBar(props: SearchBarProps) {
const [isActive, setIsactive] = React.useState(false);
const { colors } = useTheme();
const [text, setText] = useState<string>("");
@ -43,7 +43,7 @@ export default function SearchBar(props: SearchBarProps) {
// changed styles.container to containerStyle
return (
<View style={containerStyle}>
<TextInput onChangeText = {handleChange} style={[{fontSize: SIZES.normal, height: "100%"}, styles.TextInput]} autoCorrect={false} keyboardType='web-search' placeholder={props.placeholder} value={text}/>
<TextInput onChangeText = {handleChange} style={[{fontSize: SIZES.normal, height: "100%"}, styles.TextInput]} autoCorrect={false} keyboardType='default' placeholder={props.placeholder} value={text}/>
{isActive &&
<TouchableOpacity style={styles.cancel} onPress={()=>{handleChange("")}}>