Cleanup donation button fork on iOS
This commit is contained in:
@@ -11,21 +11,19 @@ const Button = ({
|
|||||||
children,
|
children,
|
||||||
iconName,
|
iconName,
|
||||||
isCTA,
|
isCTA,
|
||||||
isVisible,
|
|
||||||
isSmall,
|
isSmall,
|
||||||
onPress,
|
onPress,
|
||||||
testID,
|
testID,
|
||||||
...props
|
...props
|
||||||
}) => {
|
}) => {
|
||||||
const buttonStyle = isCTA ? styles.cta : styles.regular
|
const buttonStyle = isCTA ? styles.cta : styles.regular
|
||||||
const buttonDisplay = isVisible ? styles.isVisible : null
|
|
||||||
const textCTA = isCTA ? styles.buttonTextBold : styles.buttonTextRegular
|
const textCTA = isCTA ? styles.buttonTextBold : styles.buttonTextRegular
|
||||||
const textStyle = [textCTA, isSmall ? textSmall : text]
|
const textStyle = [textCTA, isSmall ? textSmall : text]
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
onPress={onPress}
|
onPress={onPress}
|
||||||
style={[buttonStyle, buttonDisplay]}
|
style={buttonStyle}
|
||||||
testID={testID}
|
testID={testID}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
@@ -39,7 +37,6 @@ Button.propTypes = {
|
|||||||
children: PropTypes.node,
|
children: PropTypes.node,
|
||||||
iconName: PropTypes.string,
|
iconName: PropTypes.string,
|
||||||
isCTA: PropTypes.bool,
|
isCTA: PropTypes.bool,
|
||||||
isVisible: PropTypes.bool,
|
|
||||||
isSmall: PropTypes.bool,
|
isSmall: PropTypes.bool,
|
||||||
onPress: PropTypes.func,
|
onPress: PropTypes.func,
|
||||||
testID: PropTypes.string,
|
testID: PropTypes.string,
|
||||||
@@ -79,10 +76,6 @@ const styles = StyleSheet.create({
|
|||||||
borderRadius: 25,
|
borderRadius: 25,
|
||||||
...button,
|
...button,
|
||||||
},
|
},
|
||||||
isVisible: {
|
|
||||||
display: 'none',
|
|
||||||
...button,
|
|
||||||
},
|
|
||||||
buttonTextBold: {
|
buttonTextBold: {
|
||||||
color: 'white',
|
color: 'white',
|
||||||
fontFamily: Fonts.bold,
|
fontFamily: Fonts.bold,
|
||||||
|
|||||||
@@ -36,14 +36,15 @@ const AboutSection = () => {
|
|||||||
</Segment>
|
</Segment>
|
||||||
<Segment title={labels.donate.title}>
|
<Segment title={labels.donate.title}>
|
||||||
<AppText>{labels.donate.note}</AppText>
|
<AppText>{labels.donate.note}</AppText>
|
||||||
|
{Platform.OS !== 'ios' && (
|
||||||
<Button
|
<Button
|
||||||
isVisible={Platform.OS === 'ios' ? true : false}
|
|
||||||
isCTA
|
isCTA
|
||||||
isSmall
|
isSmall
|
||||||
onPress={() => Linking.openURL(links.donate.url)}
|
onPress={() => Linking.openURL(links.donate.url)}
|
||||||
>
|
>
|
||||||
{links.donate.text}
|
{links.donate.text}
|
||||||
</Button>
|
</Button>
|
||||||
|
)}
|
||||||
</Segment>
|
</Segment>
|
||||||
<Segment title={labels.version.title} last>
|
<Segment title={labels.version.title} last>
|
||||||
<AppText>{require('../../package.json').version}</AppText>
|
<AppText>{require('../../package.json').version}</AppText>
|
||||||
|
|||||||
Reference in New Issue
Block a user