MCPcopy Create free account
hub / github.com/Galaxies-dev/airbnb-clone-react-native / ModalHeaderText

Function ModalHeaderText

components/ModalHeaderText.tsx:5–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import Colors from '@/constants/Colors';
4
5const ModalHeaderText = () => {
6 const [active, setActive] = useState(0);
7 return (
8 <View style={{ flexDirection: 'row', justifyContent: 'center', gap: 10 }}>
9 <TouchableOpacity onPress={() => setActive(0)}>
10 <Text
11 style={{
12 fontFamily: 'mon-sb',
13 fontSize: 18,
14 color: active == 0 ? '#000' : Colors.grey,
15 textDecorationLine: active == 0 ? 'underline' : 'none',
16 }}>
17 Stays
18 </Text>
19 </TouchableOpacity>
20 <TouchableOpacity onPress={() => setActive(1)}>
21 <Text
22 style={{
23 fontFamily: 'mon-sb',
24 fontSize: 18,
25 color: active == 1 ? '#000' : Colors.grey,
26 textDecorationLine: active == 1 ? 'underline' : 'none',
27 }}>
28 Experiences
29 </Text>
30 </TouchableOpacity>
31 </View>
32 );
33};
34
35export default ModalHeaderText;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected