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 { ScrollView } from 'react-native'
import React from 'react'
import AppPage from '../common/app-page'
import AppText from '../common/app-text'
import labels from '../../i18n/en/settings'
import links from '../../i18n/en/links'
import FramedSegment from '../common/framed-segment'
export default class AboutSection extends Component {
render() {
import labels from '../../i18n/en/settings'
import links from '../../i18n/en/links'
const AboutSection = () => {
return (
<ScrollView>
<FramedSegment title={labels.aboutSection.title}>
<AppPage title={labels.aboutSection.title} >
<FramedSegment>
<AppText>{labels.aboutSection.text}</AppText>
</FramedSegment>
<FramedSegment title={labels.philosophy.title}>
@@ -27,7 +28,8 @@ export default class AboutSection extends Component {
<FramedSegment title={labels.version.title} last>
<AppText>{require('../../package.json').version}</AppText>
</FramedSegment>
</ScrollView>
</AppPage>
)
}
}
export default AboutSection
+13 -12
View File
@@ -1,18 +1,19 @@
import React, { Component } from 'react'
import { View, ScrollView } from 'react-native'
import React from 'react'
import AppPage from '../common/app-page'
import AppText from '../common/app-text'
import styles from '../../styles/index'
import FramedSegment from '../common/framed-segment'
import labels from '../../i18n/en/settings'
export default class License extends Component {
render() {
const License = () => {
return (
<ScrollView>
<View style={styles.framedSegment}>
<AppText style={styles.framedSegmentTitle}>{`${labels.license.title} `}</AppText>
<AppText>{`${labels.license.text} `}</AppText>
</View>
</ScrollView>
<AppPage title={labels.license.title} >
<FramedSegment last >
<AppText>{labels.license.text}</AppText>
</FramedSegment>
</AppPage>
)
}
}
export default License
+1
View File
@@ -1,4 +1,5 @@
export default {
greenSuperLight: '#E9F2ED',
grey: '#A5A5A5',
greyLight: '#D2D2D2',
greySuperLight: '#F2F2F2',
+5 -1
View File
@@ -5,7 +5,7 @@ export default {
bottomBorder: {
borderStyle: 'solid',
borderBottomWidth: 2,
borderBottomColor: Colors.greySuperLight,
borderBottomColor: Colors.greyLight,
paddingBottom: Spacing.base
},
centerItems: {
@@ -24,5 +24,9 @@ export default {
backgroundColor: Colors.orange,
borderRadius: 25
},
page: {
backgroundColor: Colors.greenSuperLight,
flex: 1
},
segmentContainer: { marginHorizontal: Spacing.base }
}
+14 -2
View File
@@ -20,6 +20,12 @@ const button = {
textTransform: 'uppercase'
}
const title = {
color: Colors.purple,
marginHorizontal: Spacing.base,
marginVertical: Spacing.large
}
export default {
buttonTextBold: {
fontFamily: fonts.bold,
@@ -33,10 +39,16 @@ export default {
fontFamily: fonts.main,
fontSize: sizes.mainMedium
},
pageTitle: {
alignSelf: 'center',
fontFamily: fonts.bold,
fontWeight: '700',
fontSize: sizes.titleMedium,
...title
},
titleSmall: {
color: Colors.purple,
fontSize: sizes.titleSmall,
marginVertical: Spacing.base
...title
},
underline: { textDecorationLine: 'underline' }
}