1
1
import React from 'react' ;
2
2
import { StyleSheet , View , Text , ScrollView } from 'react-native' ;
3
+ import { useRoute } from '@react-navigation/native' ;
3
4
4
5
import Icon from 'react-native-vector-icons/Entypo' ;
5
6
import { colors , fonts } from '../../styles' ;
6
7
7
8
import { Button , RadioGroup , Dropdown } from '../../components' ;
8
9
9
10
export default function ComponentsScreen ( props ) {
11
+ const route = useRoute ( ) ;
10
12
return (
11
13
< ScrollView
12
14
style = { styles . container }
@@ -48,55 +50,55 @@ export default function ComponentsScreen(props) {
48
50
49
51
< View style = { styles . demoButtonsContainer } >
50
52
< Button
51
- style = { styles . demoButton }
53
+ style = { [ styles . demoButton , { flexBasis : '47%' } ] }
52
54
primary
53
55
caption = "Button"
54
56
onPress = { ( ) => { } }
55
57
/>
56
58
< Button
57
- style = { styles . demoButton }
59
+ style = { [ styles . demoButton , { flexBasis : '47%' } ] }
58
60
secondary
59
61
caption = "Button"
60
62
onPress = { ( ) => { } }
61
63
/>
62
64
< Button
63
- style = { styles . demoButton }
65
+ style = { [ styles . demoButton , { flexBasis : '47%' } ] }
64
66
primary
65
67
rounded
66
68
caption = "Button"
67
69
onPress = { ( ) => { } }
68
70
/>
69
71
< Button
70
- style = { styles . demoButton }
72
+ style = { [ styles . demoButton , { flexBasis : '47%' } ] }
71
73
secondary
72
74
rounded
73
75
caption = "Button"
74
76
onPress = { ( ) => { } }
75
77
/>
76
78
< Button
77
- style = { styles . demoButton }
79
+ style = { [ styles . demoButton , { flexBasis : '47%' } ] }
78
80
primary
79
81
bordered
80
82
caption = "Button"
81
83
onPress = { ( ) => { } }
82
84
/>
83
85
< Button
84
- style = { styles . demoButton }
86
+ style = { [ styles . demoButton , { flexBasis : '47%' } ] }
85
87
secondary
86
88
bordered
87
89
caption = "Button"
88
90
onPress = { ( ) => { } }
89
91
/>
90
92
< Button
91
- style = { styles . demoButton }
93
+ style = { [ styles . demoButton , { flexBasis : '47%' } ] }
92
94
primary
93
95
bordered
94
96
rounded
95
97
caption = "Button"
96
98
onPress = { ( ) => { } }
97
99
/>
98
100
< Button
99
- style = { styles . demoButton }
101
+ style = { [ styles . demoButton , { flexBasis : '47%' } ] }
100
102
secondary
101
103
bordered
102
104
rounded
@@ -325,7 +327,7 @@ export default function ComponentsScreen(props) {
325
327
</ View >
326
328
327
329
< Button
328
- style = { [ styles . demoButton , { width : 200 , alignSelf : 'center' } ] }
330
+ style = { [ styles . demoButton , { flex : 1 } ] }
329
331
primary
330
332
bordered
331
333
caption = "More Icons"
@@ -336,7 +338,7 @@ export default function ComponentsScreen(props) {
336
338
< Text style = { styles . componentSectionHeader } > Dropdown</ Text >
337
339
338
340
< Dropdown
339
- style = { { width : 200 , alignSelf : 'center' } }
341
+ style = { { width : '100%' , alignSelf : 'center' } }
340
342
onSelect = { ( ) => { } }
341
343
items = { [ 'option 1' , 'option 2' ] }
342
344
/>
@@ -354,14 +356,15 @@ const styles = StyleSheet.create({
354
356
} ,
355
357
componentsSection : {
356
358
backgroundColor : colors . white ,
357
- padding : 15 ,
359
+ paddingHorizontal : 16 ,
360
+ paddingVertical : 24 ,
358
361
marginBottom : 20 ,
359
362
borderRadius : 5 ,
360
363
} ,
361
364
componentSectionHeader : {
362
365
fontFamily : fonts . primaryRegular ,
363
366
color : '#686868' ,
364
- fontSize : 20 ,
367
+ fontSize : 24 ,
365
368
marginBottom : 20 ,
366
369
} ,
367
370
demoButtonsContainer : {
@@ -376,7 +379,8 @@ const styles = StyleSheet.create({
376
379
flexWrap : 'wrap' ,
377
380
flex : 1 ,
378
381
alignItems : 'center' ,
379
- justifyContent : 'space-around' ,
382
+ justifyContent : 'space-between' ,
383
+ paddingHorizontal : 3 ,
380
384
marginBottom : 20 ,
381
385
} ,
382
386
demoButton : {
0 commit comments