Introduces Home component redesign

This commit is contained in:
mashazyu
2020-03-24 20:15:01 +01:00
committed by Sofiya Tepikin
parent b6c0fd0dce
commit 29d76d19b1
11 changed files with 150 additions and 180 deletions
+21 -10
View File
@@ -7,7 +7,7 @@ import AppText from './app-text'
import { Colors, Fonts, Spacing } from '../../styles/redesign'
const Button = ({ children, isCTA, onPress, testID }) => {
const buttonStyle = isCTA ? styles.orange : {}
const buttonStyle = isCTA ? styles.cta : styles.regular
const textStyle = isCTA ? styles.buttonTextBold : styles.buttonTextRegular
return (
<TouchableOpacity onPress={onPress} style={buttonStyle} testID={testID}>
@@ -23,24 +23,35 @@ Button.propTypes = {
testID: PropTypes.string
}
const button = {
paddingHorizontal: Spacing.large,
paddingVertical: Spacing.base,
const text = {
padding: Spacing.base,
textTransform: 'uppercase'
}
const button = {
alignItems: 'center',
justifyContent: 'center',
margin: Spacing.base
}
const styles = StyleSheet.create({
orange: {
regular: {
...button
},
cta: {
backgroundColor: Colors.orange,
borderRadius: 25
borderRadius: 25,
...button
},
buttonTextBold: {
fontFamily: Fonts.main,
...button
color: 'white',
fontFamily: Fonts.bold,
...text
},
buttonTextRegular: {
fontFamily: Fonts.bold,
...button
color: Colors.greyDark,
fontFamily: Fonts.main,
...text
}
})