Files
react-native-fast-image/ReactNativeFastImageExample/FastImage/Button.js
T

29 lines
651 B
JavaScript
Raw Normal View History

import React from 'react'
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native'
const Button = ({ text, onPress }) => (
2018-05-06 19:04:28 -04:00
<TouchableOpacity onPress={onPress}>
<View style={styles.button}>
<Text style={styles.text}>{text}</Text>
</View>
</TouchableOpacity>
)
const styles = StyleSheet.create({
2018-05-06 19:04:28 -04:00
button: {
backgroundColor: 'black',
margin: 5,
height: 44,
paddingLeft: 10,
paddingRight: 10,
borderRadius: 10,
alignItems: 'center',
justifyContent: 'center',
},
text: {
color: 'white',
},
})
export default Button