MCPcopy Create free account
hub / github.com/dabit3/react-native-ai / Header

Function Header

app/src/components/Header.tsx:9–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7import { FontAwesome5 as FontAwesome } from '@expo/vector-icons'
8import { Theme } from '../../types'
9
10export function Header() {
11 const { theme } = useContext(ThemeContext)
12 const {
13 handlePresentModalPress,
14 chatType
15 } = useContext(AppContext)
16 const styles = getStyles(theme)
17 const ModelIcon = chatType.icon
18
19 return (
20 <View style={styles.container}>
21 <Icon size={34} fill={theme.textColor} />
22 <TouchableOpacity
23 style={styles.modelPill}
24 onPress={handlePresentModalPress}
25 accessibilityRole="button"
26 accessibilityLabel={`Current model: ${chatType.name}. Tap to change model.`}
27 >
28 <ModelIcon size={14} theme={theme} />
29 <Text style={styles.modelPillText} numberOfLines={1}>
30 {chatType.name}
31 </Text>
32 </TouchableOpacity>
33 <TouchableHighlight
34 style={styles.buttonContainer}
35 underlayColor={'transparent'}
36 activeOpacity={0.6}

Callers

nothing calls this directly

Calls 1

getStylesFunction · 0.70

Tested by

no test coverage detected