1import { Button } from 'react-native-elements';
2import Icon from 'react-native-vector-icons/FontAwesome';
3
4<View style={styles.buttonContainer}>
5<Button title='update state' onPress={do something}/>
6</View>
7
8or
9
10<Button
11 title="Solid Button"
12/>
13
14<Button
15 title="Outline button"
16 type="outline"
17/>
18
19<Button
20 title="Clear button"
21 type="clear"
22/>
23
24<Button
25 icon={
26 <Icon
27 name="arrow-right"
28 size={15}
29 color="white"
30 />
31 }
32 title="Button with icon component"
33/>
34
35<Button
36 icon={{
37 name: "arrow-right",
38 size: 15,
39 color: "white"
40 }}
41 title="Button with icon object"
42/>
43
44<Button
45 icon={
46 <Icon
47 name="arrow-right"
48 size={15}
49 color="white"
50 />
51 }
52 iconRight
53 title="Button with right icon"
54/>
55
56<Button
57 title="Loading button"
58 loading
59/>
60
61Source:
62https://reactnativeelements.com/docs/button/
1import { Button } from 'react-native-elements';
2import Icon from 'react-native-vector-icons/FontAwesome';
3
4<Button
5 title="Solid Button"
6/>
7
8<Button
9 title="Outline button"
10 type="outline"
11/>
12
13<Button
14 title="Clear button"
15 type="clear"
16/>
17
18<Button
19 icon={
20 <Icon
21 name="arrow-right"
22 size={15}
23 color="white"
24 />
25 }
26 title="Button with icon component"
27/>
28
29<Button
30 icon={{
31 name: "arrow-right",
32 size: 15,
33 color: "white"
34 }}
35 title="Button with icon object"
36/>
37
38<Button
39 icon={
40 <Icon
41 name="arrow-right"
42 size={15}
43 color="white"
44 />
45 }
46 iconRight
47 title="Button with right icon"
48/>
49
50<Button
51 title="Loading button"
52 loading
53/>
54