Updates styling of Stats page
This commit is contained in:
@@ -50,29 +50,30 @@ const Cell = ({ content, isLeft }) => {
|
|||||||
|
|
||||||
Cell.propTypes = {
|
Cell.propTypes = {
|
||||||
content: PropTypes.node.isRequired,
|
content: PropTypes.node.isRequired,
|
||||||
isLeft: PropTypes.bool
|
isLeft: PropTypes.bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
accentOrange: {
|
accentOrange: {
|
||||||
...Typography.accentOrange
|
...Typography.accentOrange,
|
||||||
|
fontSize: 18,
|
||||||
},
|
},
|
||||||
accentPurpleBig: {
|
accentPurpleBig: {
|
||||||
...Typography.accentPurpleBig,
|
...Typography.accentPurpleBig,
|
||||||
marginRight: Spacing.base
|
marginRight: Spacing.base,
|
||||||
},
|
},
|
||||||
cellLeft: {
|
cellLeft: {
|
||||||
alignItems: 'flex-end',
|
alignItems: 'flex-end',
|
||||||
flex: 5,
|
flex: 5,
|
||||||
justifyContent: 'center'
|
justifyContent: 'center',
|
||||||
},
|
},
|
||||||
cellRight: {
|
cellRight: {
|
||||||
flex: 6,
|
flex: 6,
|
||||||
justifyContent: 'center'
|
justifyContent: 'center',
|
||||||
},
|
},
|
||||||
row: {
|
row: {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
marginBottom: Spacing.tiny
|
marginBottom: Spacing.tiny,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
+17
-14
@@ -10,7 +10,7 @@ import cycleModule from '../lib/cycle'
|
|||||||
import {getCycleLengthStats as getCycleInfo} from '../lib/cycle-length'
|
import {getCycleLengthStats as getCycleInfo} from '../lib/cycle-length'
|
||||||
import {stats as labels} from '../i18n/en/labels'
|
import {stats as labels} from '../i18n/en/labels'
|
||||||
|
|
||||||
import { Sizes, Spacing, Typography } from '../styles'
|
import { Spacing, Typography } from '../styles'
|
||||||
|
|
||||||
const image = require('../assets/cycle-icon.png')
|
const image = require('../assets/cycle-icon.png')
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ const Stats = () => {
|
|||||||
[numberOfCycles, labels.basisOfStatsEnd]
|
[numberOfCycles, labels.basisOfStatsEnd]
|
||||||
]
|
]
|
||||||
return (
|
return (
|
||||||
<AppPage>
|
<AppPage contentContainerStyle={styles.pageContainer}>
|
||||||
<Segment last style={styles.pageContainer}>
|
<Segment last style={styles.pageContainer}>
|
||||||
<AppText>{labels.cycleLengthExplainer}</AppText>
|
<AppText>{labels.cycleLengthExplainer}</AppText>
|
||||||
{!hasAtLeastOneCycle && <AppText>{labels.emptyStats}</AppText>}
|
{!hasAtLeastOneCycle && <AppText>{labels.emptyStats}</AppText>}
|
||||||
@@ -66,20 +66,21 @@ const Stats = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const column = {
|
const column = {
|
||||||
flexDirection: 'column'
|
flexDirection: 'column',
|
||||||
}
|
}
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
accentOrange: {
|
accentOrange: {
|
||||||
...Typography.accentOrange
|
...Typography.accentOrange,
|
||||||
|
fontSize: 20,
|
||||||
},
|
},
|
||||||
accentPurpleGiant: {
|
accentPurpleGiant: {
|
||||||
...Typography.accentPurpleGiant,
|
...Typography.accentPurpleGiant,
|
||||||
marginVertical: -25
|
|
||||||
},
|
},
|
||||||
accentPurpleHuge: {
|
accentPurpleHuge: {
|
||||||
...Typography.accentPurpleHuge,
|
...Typography.accentPurpleHuge,
|
||||||
marginRight: Spacing.base
|
marginRight: Spacing.base,
|
||||||
|
marginTop: -15,
|
||||||
},
|
},
|
||||||
container: {
|
container: {
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
@@ -88,24 +89,26 @@ const styles = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
columnLeft: {
|
columnLeft: {
|
||||||
...column,
|
...column,
|
||||||
flex: 4
|
flex: 4,
|
||||||
},
|
},
|
||||||
columnRight: {
|
columnRight: {
|
||||||
...column,
|
...column,
|
||||||
flex: 5
|
flex: 5,
|
||||||
|
paddingTop: Spacing.small,
|
||||||
},
|
},
|
||||||
image: {
|
image: {
|
||||||
height: Sizes.huge * 3,
|
height: 120,
|
||||||
marginLeft: Sizes.huge / 2,
|
marginLeft: 20,
|
||||||
|
marginTop: 20,
|
||||||
resizeMode: 'contain',
|
resizeMode: 'contain',
|
||||||
width: Sizes.huge * 3
|
width: 120,
|
||||||
},
|
},
|
||||||
imageContainter: {
|
imageContainter: {
|
||||||
paddingTop: Sizes.huge,
|
paddingTop: 40,
|
||||||
marginBottom: Sizes.huge / 4
|
marginBottom: 20,
|
||||||
},
|
},
|
||||||
pageContainer: {
|
pageContainer: {
|
||||||
marginVertical: Spacing.large
|
marginVertical: Spacing.base,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user