1
1
import React , { Component } from 'react' ;
2
- import { TouchableOpacity , ScrollView , Platform , StyleSheet } from 'react-native' ;
2
+ import { TouchableOpacity , ScrollView } from 'react-native' ;
3
3
import { Assets , RadioButton , Colors , Shadows , RadioGroup , View , Text } from 'react-native-ui-lib' ; //eslint-disable-line
4
4
const starIcon = require ( '../../assets/icons/star.png' ) ;
5
5
@@ -39,7 +39,14 @@ export default class RadioButtonScreen extends Component {
39
39
renderRadioButtonWithImage ( value , icon , style ) {
40
40
return (
41
41
< View row centerV marginR-15 >
42
- < RadioButton value = { value } size = { 15 } color = { Colors . green30 } borderRadius = { 0 } iconSource = { icon } iconStyle = { style } />
42
+ < RadioButton
43
+ value = { value }
44
+ size = { 15 }
45
+ color = { Colors . green30 }
46
+ borderRadius = { 0 }
47
+ iconSource = { icon }
48
+ iconStyle = { style }
49
+ />
43
50
</ View >
44
51
) ;
45
52
}
@@ -55,8 +62,12 @@ export default class RadioButtonScreen extends Component {
55
62
render ( ) {
56
63
return (
57
64
< View flex useSafeArea bg-grey80 >
58
- < View flex >
59
- < ScrollView style = { { padding : 20 } } >
65
+ < ScrollView >
66
+ < View padding-page >
67
+ < Text h1 marginB-s5 >
68
+ Radio Buttons
69
+ </ Text >
70
+
60
71
< RadioGroup initialValue = { this . state . color || null } onValueChange = { value => this . setState ( { color : value } ) } >
61
72
< Text marginB-20 text60 grey10 >
62
73
Select a color{ '\n' }
@@ -69,7 +80,11 @@ export default class RadioButtonScreen extends Component {
69
80
< Text marginT-10 > You chose: { this . state . color ? this . state . color : 'Default' } </ Text >
70
81
</ RadioGroup >
71
82
72
- < RadioGroup marginT-30 initialValue = { this . state . textSide } onValueChange = { value => this . setState ( { textSide : value } ) } >
83
+ < RadioGroup
84
+ marginT-30
85
+ initialValue = { this . state . textSide }
86
+ onValueChange = { value => this . setState ( { textSide : value } ) }
87
+ >
73
88
< Text marginB-20 text60 grey10 >
74
89
Alignments
75
90
</ Text >
@@ -129,28 +144,9 @@ export default class RadioButtonScreen extends Component {
129
144
</ View >
130
145
131
146
< View style = { { height : 30 } } />
132
- </ ScrollView >
133
-
134
- < View paddingH-20 paddingV-10 style = { [ styles . shadow , { backgroundColor : Colors . grey80 } ] } >
135
- < Text text40 grey10 >
136
- Radio Buttons
137
- </ Text >
138
147
</ View >
139
- </ View >
148
+ </ ScrollView >
140
149
</ View >
141
150
) ;
142
151
}
143
152
}
144
-
145
- const styles = StyleSheet . create ( {
146
- shadow : {
147
- ...Platform . select ( {
148
- ios : {
149
- ...Shadows . grey20 . bottom
150
- } ,
151
- android : {
152
- elevation : 3
153
- }
154
- } )
155
- }
156
- } ) ;
0 commit comments