refactor about section
This commit is contained in:
@@ -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>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user