Extract navigation arrow and give it more padding

This commit is contained in:
Julia Friesel
2018-11-16 16:01:53 +01:00
parent d9123584c3
commit 3aacff6f83
5 changed files with 54 additions and 33 deletions
+4 -9
View File
@@ -8,19 +8,14 @@ import styles from '../../styles'
import CycleDayHeader from './cycle-day'
import SymptomViewHeader from './symptom-view'
export default function Header(props) {
export default function Header(p) {
const middle = Dimensions.get('window').width / 2
const props = Object.assign({}, p, {middle})
return (
props.isCycleDayOverView ?
<CycleDayHeader
middle={middle}
{...props}
/>
<CycleDayHeader {...props} />
: props.isSymptomView ?
<SymptomViewHeader
middle={middle}
{...props}
/>
<SymptomViewHeader {...props}/>
:
<View style={styles.header}>
<View style={styles.accentCircle} />