MCPcopy Index your code
hub / github.com/callstack/react-native-paper / ExampleList

Function ExampleList

example/src/ExampleList.tsx:132–172  ·  view source on GitHub ↗
({ navigation }: Props)

Source from the content-addressed store, hash-verified

130);
131
132export default function ExampleList({ navigation }: Props) {
133 const keyExtractor = (item: { id: string }) => item.id;
134
135 const { colors, isV3 } = useExampleTheme();
136 const safeArea = useSafeAreaInsets();
137
138 const renderItem = ({ item }: { item: Item }) => {
139 const { data, id } = item;
140
141 if (!isV3 && data.title === mainExamples.themingWithReactNavigation.title) {
142 return null;
143 }
144
145 return (
146 <List.Item
147 unstable_pressDelay={65}
148 title={data.title}
149 onPress={() => navigation.navigate(id)}
150 />
151 );
152 };
153
154 return (
155 <FlatList
156 contentContainerStyle={{
157 backgroundColor: colors.background,
158 paddingBottom: safeArea.bottom,
159 paddingLeft: safeArea.left,
160 paddingRight: safeArea.right,
161 }}
162 style={{
163 backgroundColor: colors.background,
164 }}
165 showsVerticalScrollIndicator={false}
166 ItemSeparatorComponent={Divider}
167 renderItem={renderItem}
168 keyExtractor={keyExtractor}
169 data={data}
170 />
171 );
172}

Callers

nothing calls this directly

Calls 1

useExampleThemeFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…