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
1var tapSpeed = React.createClass({
2 render: function() {
3 return (
4 <View style={styles.container}>
5 <Text style={styles.welcome}>
6 Tap me as fast as you can!
7 </Text>
8 <View style={styles.button}>
9 !
10 </View>
11 </View>
12 );
13 }
14});
15
16var styles = StyleSheet.create({
17 container: {
18 flex: 1,
19 justifyContent: 'center',
20 alignItems: 'center',
21 backgroundColor: '#FFCCCC'
22 },
23 welcome: {
24 fontSize: 20,
25 textAlign: 'center',
26 margin: 10
27 },
28 button: {
29 textAlign: 'center',
30 color: '#ffffff',
31 marginBottom: 7,
32 border: 1px solid blue,
33 borderRadius: 2px
34 }
35});