mirror of
https://github.com/mudabbir-ahmad/MAD-Treasure-Hunt.git
synced 2026-10-08 03:00:20 +00:00
35 lines
723 B
React
35 lines
723 B
React
import React from 'react';
|
|
import {StyleSheet, TextInput, View} from 'react-native';
|
|
|
|
const SearchBar = ({ placeholder = 'Search...', value, onChangeText, style = {} }) => {
|
|
return (
|
|
<View style={[styles.container, style]}>
|
|
<TextInput
|
|
style={styles.input}
|
|
placeholder={placeholder}
|
|
value={value}
|
|
onChangeText={onChangeText}
|
|
placeholderTextColor="#9ca3af"
|
|
/>
|
|
</View>
|
|
);
|
|
};
|
|
|
|
const styles = StyleSheet.create({
|
|
container: {
|
|
marginBottom: 12,
|
|
},
|
|
input: {
|
|
borderWidth: 1,
|
|
borderColor: '#d1d5db',
|
|
borderRadius: 8,
|
|
paddingHorizontal: 12,
|
|
paddingVertical: 10,
|
|
fontSize: 14,
|
|
color: '#111827',
|
|
},
|
|
});
|
|
|
|
export default SearchBar;
|
|
|