@@ -11,16 +11,18 @@ import {
11
11
Switch ,
12
12
useWindowDimensions ,
13
13
ActivityIndicator ,
14
+ View ,
14
15
} from 'react-native' ;
15
16
import Slider from '@react-native-community/slider' ;
16
17
import { Center , HStack , ScrollView , VStack } from 'native-base' ;
17
18
18
19
import { Screen } from '../../components/Screen' ;
19
20
import { Section } from '../../components/Section' ;
20
21
import { nativeBaseTheme } from '../../theme/nativeBaseTheme' ;
22
+ import Icon from 'react-native-vector-icons/Ionicons' ;
21
23
22
24
/**
23
- * A screen that demonstates the usage of user steps with basic React Native components.
25
+ * A screen that demonstrates the usage of user steps with basic React Native components.
24
26
*
25
27
* This specific screen doesn't use NativeBase in some parts since we need to focus on
26
28
* capturing React Native provided components rather than implementations built on top of it.
@@ -62,13 +64,51 @@ export const BasicComponentsScreen: React.FC = () => {
62
64
< VStack space = "xs" >
63
65
< Button onPress = { onPress ( 'Default Button' ) } title = "Default Button" />
64
66
65
- < Pressable onPress = { onPress ( 'Pressable Button' ) } style = { styles . button } >
66
- < Text style = { styles . buttonText } > Pressable Button</ Text >
67
+ < Pressable onPress = { onPress ( 'Icon Pressable Button' ) } style = { styles . button } >
68
+ < HStack space = { 2 } alignItems = "center" justifyContent = "center" >
69
+ < Icon name = "alert-circle-outline" color = "white" />
70
+ < Text style = { styles . buttonText } > Icon Pressable Button</ Text >
71
+ </ HStack >
67
72
</ Pressable >
68
73
69
74
< TouchableOpacity onPress = { onPress ( 'Touchable Opacity Button' ) } style = { styles . button } >
70
75
< Text style = { styles . buttonText } > Touchable Button</ Text >
71
76
</ TouchableOpacity >
77
+
78
+ < TouchableOpacity onPress = { onPress ( 'Touchable Opacity Button' ) } style = { styles . button } >
79
+ < Text style = { styles . buttonText } > Touchable Button</ Text >
80
+ < Text style = { styles . buttonText } > Multiple Texts</ Text >
81
+ </ TouchableOpacity >
82
+
83
+ < Pressable onPress = { onPress ( 'Touchable Opacity Button' ) } style = { styles . button } >
84
+ < Text style = { styles . buttonText } > Pressable Button</ Text >
85
+ < View >
86
+ < HStack space = { 2 } alignItems = "center" justifyContent = "center" >
87
+ < Icon name = "alert-circle-outline" color = "white" />
88
+ < Text style = { styles . buttonText } > Icon Pressable Button</ Text >
89
+ </ HStack >
90
+ </ View >
91
+ </ Pressable >
92
+
93
+ < Icon . Button
94
+ style = { styles . button }
95
+ name = "alert-circle-outline"
96
+ backgroundColor = "#4A99E9"
97
+ size = { 12 }
98
+ onPress = { onPress ( 'Icon.Button' ) } >
99
+ < Text style = { styles . buttonText } > Icon Button</ Text >
100
+ </ Icon . Button >
101
+
102
+ < TouchableOpacity onPress = { onPress ( 'Touchable Opacity Button' ) } style = { styles . button } >
103
+ < Text style = { styles . buttonText } > 1 Tier</ Text >
104
+ < View >
105
+ < View >
106
+ < View >
107
+ < Text style = { styles . buttonText } > 4 Tier Nested Button</ Text >
108
+ </ View >
109
+ </ View >
110
+ </ View >
111
+ </ TouchableOpacity >
72
112
</ VStack >
73
113
</ Section >
74
114
@@ -129,6 +169,7 @@ const styles = StyleSheet.create({
129
169
formControlStyles . formControl ,
130
170
{
131
171
backgroundColor : nativeBaseTheme . colors . primary [ 600 ] ,
172
+ justifyContent : 'center' ,
132
173
} ,
133
174
] ) ,
134
175
} ) ;
0 commit comments