1import * as React from 'react';
2
3import ExpoAPIIcon from '../components/ExpoAPIIcon';
4import { Screens } from '../navigation/ExpoComponents';
5import ComponentListScreen from './ComponentListScreen';
6
7const screens = [
8  'ActivityIndicator',
9  'AdMob',
10  'BarCodeScanner',
11  'BlurView',
12  'Button',
13  'Camera',
14  'Checkbox',
15  'DateTimePicker',
16  'DrawerLayoutAndroid',
17  'FacebookAds',
18  'GL',
19  'GestureHandlerList',
20  'GestureHandlerPinch',
21  'GestureHandlerSwipeable',
22  'Gif',
23  'HTML',
24  'Image',
25  'LinearGradient',
26  'Lottie',
27  'Maps',
28  'MaskedView',
29  'Modal',
30  'Picker',
31  'Pressable',
32  'ProgressBarAndroid',
33  'ProgressViewIOS',
34  'QRCode',
35  'Reanimated',
36  'SVG',
37  'Screens',
38  'ScrollView',
39  'SegmentedControl',
40  'SharedElement',
41  'Slider',
42  'Switch',
43  'Text',
44  'TextInput',
45  'TouchableBounce',
46  'Touchables',
47  'Video',
48  'ViewPager',
49  'WebView',
50];
51
52export const ScreenItems = screens.map(name => ({
53  name,
54  route: `/components/${name.toLowerCase()}`,
55  isAvailable: !!Screens[name],
56}));
57
58export default function ExpoComponentsScreen() {
59  const renderItemRight = React.useCallback(
60    ({ name }) => <ExpoAPIIcon name={name} style={{ marginRight: 10, marginLeft: 6 }} />,
61    []
62  );
63
64  return <ComponentListScreen renderItemRight={renderItemRight} apis={ScreenItems} />;
65}
66