forked from Eas0nS/Odometer-Terminator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCustomButton.js
More file actions
28 lines (25 loc) · 714 Bytes
/
CustomButton.js
File metadata and controls
28 lines (25 loc) · 714 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import React, { Component } from 'react';
import { StyleSheet, Text, View, TouchableOpacity } from 'react-native';
const customButton = props => {
const content = (
<View style={[styles.button, { backgroundColor: props.color}]}>
<Text style={styles.text}>{props.text}</Text>
</View>
)
return<TouchableOpacity onPress={props.onPress}>{content}</TouchableOpacity>
}
const styles = StyleSheet.create({
button: {
// padding: 16,
width: 200,
height: 40,
borderRadius: 50,
alignItems: 'center',
justifyContent: 'center',
},
text: {
color: 'black',
fontSize: 20,
},
});
export default customButton;