Introduces License and About components redesign

This commit is contained in:
mashazyu
2020-03-23 10:48:12 +01:00
committed by Sofiya Tepikin
parent 3f8f6dbbe6
commit 4f30db69f3
6 changed files with 98 additions and 46 deletions
+32
View File
@@ -0,0 +1,32 @@
import React from 'react'
import PropTypes from 'prop-types'
import { ScrollView, StyleSheet } from 'react-native'
import AppText from '../common/app-text'
import { Containers, Typography } from '../../styles/redesign'
const AppPage = ({ children, title }) => {
return(
<ScrollView style={styles.container}>
{title && <AppText style={styles.title}>{title}</AppText>}
{children}
</ScrollView>
)
}
AppPage.propTypes = {
children: PropTypes.node,
title: PropTypes.string
}
const styles = StyleSheet.create({
container: {
...Containers.page
},
title: {
...Typography.pageTitle
}
})
export default AppPage
+12 -10
View File
@@ -1,15 +1,16 @@
import React, { Component } from 'react' import React from 'react'
import { ScrollView } from 'react-native'
import AppPage from '../common/app-page'
import AppText from '../common/app-text' import AppText from '../common/app-text'
import labels from '../../i18n/en/settings'
import links from '../../i18n/en/links'
import FramedSegment from '../common/framed-segment' import FramedSegment from '../common/framed-segment'
export default class AboutSection extends Component { import labels from '../../i18n/en/settings'
render() { import links from '../../i18n/en/links'
const AboutSection = () => {
return ( return (
<ScrollView> <AppPage title={labels.aboutSection.title} >
<FramedSegment title={labels.aboutSection.title}> <FramedSegment>
<AppText>{labels.aboutSection.text}</AppText> <AppText>{labels.aboutSection.text}</AppText>
</FramedSegment> </FramedSegment>
<FramedSegment title={labels.philosophy.title}> <FramedSegment title={labels.philosophy.title}>
@@ -27,7 +28,8 @@ export default class AboutSection extends Component {
<FramedSegment title={labels.version.title} last> <FramedSegment title={labels.version.title} last>
<AppText>{require('../../package.json').version}</AppText> <AppText>{require('../../package.json').version}</AppText>
</FramedSegment> </FramedSegment>
</ScrollView> </AppPage>
) )
} }
}
export default AboutSection
+13 -12
View File
@@ -1,18 +1,19 @@
import React, { Component } from 'react' import React from 'react'
import { View, ScrollView } from 'react-native'
import AppPage from '../common/app-page'
import AppText from '../common/app-text' import AppText from '../common/app-text'
import styles from '../../styles/index' import FramedSegment from '../common/framed-segment'
import labels from '../../i18n/en/settings' import labels from '../../i18n/en/settings'
export default class License extends Component { const License = () => {
render() {
return ( return (
<ScrollView> <AppPage title={labels.license.title} >
<View style={styles.framedSegment}> <FramedSegment last >
<AppText style={styles.framedSegmentTitle}>{`${labels.license.title} `}</AppText> <AppText>{labels.license.text}</AppText>
<AppText>{`${labels.license.text} `}</AppText> </FramedSegment>
</View> </AppPage>
</ScrollView>
) )
} }
}
export default License
+1
View File
@@ -1,4 +1,5 @@
export default { export default {
greenSuperLight: '#E9F2ED',
grey: '#A5A5A5', grey: '#A5A5A5',
greyLight: '#D2D2D2', greyLight: '#D2D2D2',
greySuperLight: '#F2F2F2', greySuperLight: '#F2F2F2',
+5 -1
View File
@@ -5,7 +5,7 @@ export default {
bottomBorder: { bottomBorder: {
borderStyle: 'solid', borderStyle: 'solid',
borderBottomWidth: 2, borderBottomWidth: 2,
borderBottomColor: Colors.greySuperLight, borderBottomColor: Colors.greyLight,
paddingBottom: Spacing.base paddingBottom: Spacing.base
}, },
centerItems: { centerItems: {
@@ -24,5 +24,9 @@ export default {
backgroundColor: Colors.orange, backgroundColor: Colors.orange,
borderRadius: 25 borderRadius: 25
}, },
page: {
backgroundColor: Colors.greenSuperLight,
flex: 1
},
segmentContainer: { marginHorizontal: Spacing.base } segmentContainer: { marginHorizontal: Spacing.base }
} }
+14 -2
View File
@@ -20,6 +20,12 @@ const button = {
textTransform: 'uppercase' textTransform: 'uppercase'
} }
const title = {
color: Colors.purple,
marginHorizontal: Spacing.base,
marginVertical: Spacing.large
}
export default { export default {
buttonTextBold: { buttonTextBold: {
fontFamily: fonts.bold, fontFamily: fonts.bold,
@@ -33,10 +39,16 @@ export default {
fontFamily: fonts.main, fontFamily: fonts.main,
fontSize: sizes.mainMedium fontSize: sizes.mainMedium
}, },
pageTitle: {
alignSelf: 'center',
fontFamily: fonts.bold,
fontWeight: '700',
fontSize: sizes.titleMedium,
...title
},
titleSmall: { titleSmall: {
color: Colors.purple,
fontSize: sizes.titleSmall, fontSize: sizes.titleSmall,
marginVertical: Spacing.base ...title
}, },
underline: { textDecorationLine: 'underline' } underline: { textDecorationLine: 'underline' }
} }