Skip to content

Commit eabf21f

Browse files
committed
timelineScreen - fix example
1 parent c780548 commit eabf21f

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

demo/src/screens/componentScreens/TimelineScreen.tsx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ const TimelineScreen = () => {
2424
setExpand(!expand);
2525
}, [expand]);
2626

27+
const renderExtraContent = () => {
28+
return (
29+
<View style={{flex: 1, marginTop: 10, backgroundColor: Colors.grey70}}>
30+
<Text>Lorem Ipsum is simply dummy text of the printing and typesetting industry.
31+
Lorem Ipsum is simply dummy text of the printing and typesetting industry</Text>
32+
</View>
33+
);
34+
};
35+
2736
const renderContent = (index = 0, anchorRef?: any) => {
2837
return (
2938
<Card padding-page>
@@ -32,8 +41,10 @@ const TimelineScreen = () => {
3241
</Text>
3342
<View marginT-5 padding-8 bg-grey70 br30>
3443
<Text>{contents[index]}</Text>
35-
<Button marginT-10 size={'small'} label={!expand ? 'Expand' : 'Close'} onPress={onPressExpand}/>
36-
{expand && <View style={{height: 100, marginTop: 10, backgroundColor: 'red'}}/>}
44+
<View right>
45+
<Button marginT-10 link size={'small'} label={!expand ? 'More info' : 'Close'} onPress={onPressExpand}/>
46+
</View>
47+
{expand && renderExtraContent()}
3748
</View>
3849
</Card>
3950
);

0 commit comments

Comments
 (0)