AppLoading/AppText/AppTextInput/Button/FramedSegment/Link -> ./common

This commit is contained in:
mashazyu
2020-03-22 17:18:28 +01:00
committed by Sofiya Tepikin
parent d3e795a51f
commit 1fc7bc17b9
37 changed files with 46 additions and 46 deletions
+31
View File
@@ -0,0 +1,31 @@
import React from 'react'
import PropTypes from 'prop-types'
import { TouchableOpacity } from 'react-native'
import AppText from './app-text'
import styles from '../../styles'
export default function Button({
backgroundColor,
children,
onPress,
style,
testID
}) {
return (
<TouchableOpacity
onPress={onPress}
style={[styles.button, style, { backgroundColor }]}
testID={testID}
>
<AppText style={styles.homeButtonText}>{children}</AppText>
</TouchableOpacity>
)
}
Button.propTypes = {
backgroundColor: PropTypes.string,
children: PropTypes.node,
onPress: PropTypes.func,
style: PropTypes.object,
testID: PropTypes.string
}