MCPcopy Create free account
hub / github.com/ajsmth/rn-tools / TabButton

Function TabButton

example/App.tsx:40–69  ·  view source on GitHub ↗
({
  id,
  isActive,
  onPress,
}: {
  id: string;
  isActive: boolean;
  onPress: () => void;
})

Source from the content-addressed store, hash-verified

38}
39
40function TabButton({
41 id,
42 isActive,
43 onPress,
44}: {
45 id: string;
46 isActive: boolean;
47 onPress: () => void;
48}) {
49 const label = id.charAt(0).toUpperCase() + id.slice(1);
50
51 return (
52 <View
53 style={{
54 alignItems: "center",
55 paddingVertical: 24,
56 }}
57 >
58 <Text
59 style={{
60 fontSize: 14,
61 fontWeight: isActive ? "bold" : "normal",
62 color: isActive ? "#007AFF" : "#8E8E93",
63 }}
64 >
65 {label}
66 </Text>
67 </View>
68 );
69}
70
71function HomeScreen() {
72 return (

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected