forked from rescript-react-native/rescript-react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExampleList.re
More file actions
77 lines (58 loc) · 2.03 KB
/
ExampleList.re
File metadata and controls
77 lines (58 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
open Utils;
type item = {
key: string,
exampleType,
displayName: string,
title: string,
description: string,
examples: array(Example.t),
};
module type ExampleT = {
let exampleType: exampleType;
let displayName: string;
let title: string;
let description: string;
let examples: array(Example.t);
};
module MakeExample = (Example: ExampleT) => {
let item = key => {
key,
exampleType: Example.exampleType,
displayName: Example.displayName,
title: Example.title,
description: Example.description,
examples: Example.examples,
};
};
module TextInput = MakeExample(TextInputExample);
module Button = MakeExample(ButtonExample);
module View = MakeExample(ViewExample);
module WebView = MakeExample(WebViewExample);
module ImageBackground = MakeExample(ImageBackgroundExample);
module NetInfo = MakeExample(NetInfoExample);
module Geolocation = MakeExample(GeolocationExample);
module TouchableNativeFeedback = MakeExample(TouchableNativeFeedbackExample);
module ProgressBarAndroid = MakeExample(ProgressBarAndroidExample);
module ViewPagerAndroid = MakeExample(ViewPagerAndroid);
module ImagePickerIOS = MakeExample(ImagePickerIOSExample);
module PermissionsAndroid = MakeExample(PermissionsAndroidExample);
module Settings = MakeExample(SettingsExample);
module ImageStore = MakeExample(ImageStoreExample);
module ActivityIndicator = MakeExample(ActivityIndicatorExample);
let components: array(item) = [|
TextInput.item("TextInput"),
Button.item("ButtonExample"),
View.item("ViewExample"),
WebView.item("WebViewExample"),
ImageBackground.item("ImageBackground"),
NetInfo.item("NetInfo"),
Geolocation.item("Geolocation"),
TouchableNativeFeedback.item("TouchableNativeFeedback"),
ProgressBarAndroid.item("ProgressBarAndroid"),
ViewPagerAndroid.item("ViewPagerAndroid"),
ImagePickerIOS.item("ImagePickerIOSExample"),
PermissionsAndroid.item("PermissionsAndroid"),
Settings.item("SettingsExample"),
ImageStore.item("ImageStoreExample"),
ActivityIndicator.item("ActivityIndicatorExample"),
|];