Skip to content

Commit

Permalink
Button is added
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwrightsoft committed Oct 10, 2018
1 parent 237f9b0 commit 2b9a1ed
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions src/components/Button.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import React from 'react';
import { Text, TouchableOpacity } from 'react-native';

const Button = ({ onPress, children }) => {
const { textStyle, buttonStyle } = styles;
return (
<TouchableOpacity style={buttonStyle} onPress={onPress}>
<Text style={textStyle}>{children}</Text>
</TouchableOpacity>
);
};

const styles = {
textStyle: {
color: '#007aff',
alignSelf: 'center',
fontSize: 16,
fontWeight: '600',
paddingTop: 10,
paddingBottom: 10
},
buttonStyle: {
flex: 1,
alignSelf: 'stretch',
backgroundColor: '#fff',
marginLeft: 5,
marginRight: 5,
marginBottom: 3,
borderWidth: 1,
borderRadius: 5,
borderColor: '#007aff'
}
};

export default Button;

0 comments on commit 2b9a1ed

Please sign in to comment.