File tree Expand file tree Collapse file tree 1 file changed +18
-14
lines changed
reason-react-navigation-example/src/components Expand file tree Collapse file tree 1 file changed +18
-14
lines changed Original file line number Diff line number Diff line change @@ -4,29 +4,33 @@ open Helpers;
44module TimelineItem = {
55 [@ react . component ]
66 let make = (~text, ~onPress) =>
7- <>
8- <TouchableOpacity
9- onPress
10- style= Style . (
11- style(~paddingHorizontal= 16 .-> dp, ~paddingVertical= 26 .-> dp, () )
12- )>
13- <Text > {text |> React . string} </Text >
14- </TouchableOpacity >
15- <View
16- style= Style . (
17- style(~borderBottomColor= "#ddd" , ~borderBottomWidth= 1 ., () )
18- )
19- />
20- </>;
7+ <TouchableOpacity
8+ onPress
9+ style= Style . (
10+ style(~paddingHorizontal= 16 .-> dp, ~paddingVertical= 26 .-> dp, () )
11+ )>
12+ <Text > {text |> React . string} </Text >
13+ </TouchableOpacity >;
2114};
2215
16+ module ItemSeparator = {
17+ [@ react . component ]
18+ let make = () =>
19+ <View
20+ style= Style . (
21+ style(~borderBottomColor= "#ddd" , ~borderBottomWidth= 1 ., () )
22+ )
23+ />;
24+ };
2325module TimelineList = {
2426 [@ react . component ]
2527 let make = (~navigation: Navigation . t ) =>
2628 <>
2729 <FlatList
2830 data= Tweet . dummyTweets
2931 keyExtractor= {({id}, _) => id}
32+ _ItemSeparatorComponent={_ => <ItemSeparator />}
33+ _ListFooterComponent= {_ => <ItemSeparator />}
3034 renderItem= {props =>
3135 <TimelineItem
3236 onPress= {_ =>
You can’t perform that action at this time.
0 commit comments