Chore: Adds buttons instead of links to about
This commit is contained in:
committed by
Lisa Hillebrand
parent
b93983243e
commit
03b359019e
@@ -0,0 +1,20 @@
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { StyleSheet, View } from 'react-native'
|
||||
|
||||
const ButtonToButton = ({ children }) => {
|
||||
return <View style={styles.container}>{children}</View>
|
||||
}
|
||||
|
||||
ButtonToButton.propTypes = {
|
||||
children: PropTypes.node,
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'space-between',
|
||||
},
|
||||
})
|
||||
|
||||
export default ButtonToButton
|
||||
@@ -1,17 +1,43 @@
|
||||
import React from 'react'
|
||||
import { Linking } from 'react-native'
|
||||
|
||||
import AppPage from '../common/app-page'
|
||||
import AppText from '../common/app-text'
|
||||
import Segment from '../common/segment'
|
||||
import Button from '../common/button'
|
||||
import ButtonToButton from '../common/button-to-button'
|
||||
|
||||
import labels from '../../i18n/en/settings'
|
||||
import links from '../../i18n/en/links'
|
||||
|
||||
const AboutSection = () => {
|
||||
return (
|
||||
<AppPage title={labels.aboutSection.title} >
|
||||
<AppPage title={labels.aboutSection.title}>
|
||||
<Segment>
|
||||
<AppText>{labels.aboutSection.text}</AppText>
|
||||
<ButtonToButton>
|
||||
<Button
|
||||
isCTA
|
||||
isSmall={true}
|
||||
onPress={() => Linking.openURL(links.email.url)}
|
||||
>
|
||||
{links.email.text}
|
||||
</Button>
|
||||
<Button
|
||||
isCTA
|
||||
isSmall={true}
|
||||
onPress={() => Linking.openURL(links.gitlab.url)}
|
||||
>
|
||||
{links.gitlab.text}
|
||||
</Button>
|
||||
<Button
|
||||
isCTA
|
||||
isSmall={true}
|
||||
onPress={() => Linking.openURL(links.website.url)}
|
||||
>
|
||||
{links.website.text}
|
||||
</Button>
|
||||
</ButtonToButton>
|
||||
</Segment>
|
||||
<Segment title={labels.philosophy.title}>
|
||||
<AppText>{labels.philosophy.text}</AppText>
|
||||
@@ -21,9 +47,13 @@ const AboutSection = () => {
|
||||
</Segment>
|
||||
<Segment title={labels.donate.title}>
|
||||
<AppText>{labels.donate.note}</AppText>
|
||||
</Segment>
|
||||
<Segment title={labels.website.title}>
|
||||
<AppText>{links.website.url}</AppText>
|
||||
<Button
|
||||
isCTA
|
||||
isSmall={true}
|
||||
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