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