refactor about section

This commit is contained in:
mashazyu
2019-01-03 17:03:12 +01:00
parent a359f8b8fc
commit 067da42eba
2 changed files with 8 additions and 8 deletions
+7 -7
View File
@@ -1,20 +1,20 @@
import React, { Component } from 'react' import React, { Component } from 'react'
import { View, ScrollView } from 'react-native' import { ScrollView } from 'react-native'
import AppText from '../app-text' import AppText from '../app-text'
import SettingsSegment from './settings-segment'
import styles from '../../styles/index' import styles from '../../styles/index'
import labels from '../../i18n/en/settings' import labels from '../../i18n/en/settings'
export default class AboutSection extends Component { export default class AboutSection extends Component {
render() { render() {
return ( return (
<ScrollView> <ScrollView>
<View style={styles.settingsSegment}> <SettingsSegment title={`${labels.aboutSection.title} `}>
<AppText style={styles.settingsSegmentTitle}>{`${labels.aboutSection.title} `}</AppText>
<AppText>{`${labels.aboutSection.segmentExplainer} `}</AppText> <AppText>{`${labels.aboutSection.segmentExplainer} `}</AppText>
</View> </SettingsSegment>
<View style={[styles.settingsSegment, styles.settingsSegmentLast]}> <SettingsSegment title={`${labels.credits.title} `} style={styles.settingsSegmentLast}>
<AppText style={styles.settingsSegmentTitle}>{`${labels.credits.title} `}</AppText>
<AppText>{`${labels.credits.note}`}</AppText> <AppText>{`${labels.credits.note}`}</AppText>
</View> </SettingsSegment>
</ScrollView> </ScrollView>
) )
} }
+1 -1
View File
@@ -7,7 +7,7 @@ import styles from '../../styles'
const SettingsSegment = ({ children, ...props }) => { const SettingsSegment = ({ children, ...props }) => {
return ( return (
<View style={styles.settingsSegment}> <View style={[styles.settingsSegment, props.style]}>
<AppText style={styles.settingsSegmentTitle}>{props.title}</AppText> <AppText style={styles.settingsSegmentTitle}>{props.title}</AppText>
{children} {children}
</View> </View>