mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 12:53:24 +00:00
first setup
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import { FontAwesome5 } from '@expo/vector-icons';
|
||||
import { useFocusEffect } from 'expo-router';
|
||||
import { useCallback, useRef, useState } from 'react';
|
||||
import { View } from 'react-native';
|
||||
import { TextInput } from 'react-native-gesture-handler';
|
||||
|
||||
import Colors from '../../../constants/Colors.js';
|
||||
import { globalStyles } from '../../../styles/global';
|
||||
import Colors from '../../../constants/Colors';
|
||||
import { useFocusEffect } from 'expo-router';
|
||||
|
||||
export default function Searchbar() {
|
||||
const [keyword, setKeyword] = useState('');
|
||||
@@ -24,41 +25,19 @@ export default function Searchbar() {
|
||||
);
|
||||
|
||||
return (
|
||||
<View
|
||||
style={{
|
||||
...globalStyles.flexRow,
|
||||
...globalStyles.itemsCenter,
|
||||
...globalStyles.border,
|
||||
...globalStyles.roundedFull,
|
||||
marginTop: 14,
|
||||
marginBottom: 24,
|
||||
}}
|
||||
>
|
||||
<View
|
||||
style={{
|
||||
...globalStyles.justifyCenter,
|
||||
...globalStyles.itemsCenter,
|
||||
width: 48,
|
||||
marginLeft: 4,
|
||||
}}
|
||||
>
|
||||
<FontAwesome5 name="search" size={18} color={Colors.dark.shade200} />
|
||||
<View className="mb-6 mt-4 flex-row items-center rounded-full border">
|
||||
<View className="ml-1 w-12 items-center justify-center">
|
||||
<FontAwesome5 name="search" size={18} color={Colors.shade[200]} />
|
||||
</View>
|
||||
<TextInput
|
||||
value={keyword}
|
||||
autoFocus={true}
|
||||
autoFocus
|
||||
onChangeText={(text) => setKeyword(text)}
|
||||
ref={inputRef}
|
||||
placeholder="What are you looking for?"
|
||||
placeholderTextColor={Colors.dark.shade200}
|
||||
style={[
|
||||
globalStyles.input,
|
||||
globalStyles.fOpenSansRegular,
|
||||
{
|
||||
width: '100%',
|
||||
},
|
||||
]}
|
||||
></TextInput>
|
||||
placeholderTextColor={Colors.shade[200]}
|
||||
className="rounded-3xl py-3 pr-5 text-white"
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user