Splits <CycleDayOverView /> to smaller components, to simplify it
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import React, { Component } from 'react'
|
||||
import { View, Dimensions } from 'react-native'
|
||||
import styles from '../../styles'
|
||||
|
||||
export default class FillerBoxes extends Component {
|
||||
render() {
|
||||
const n = Dimensions.get('window').width / styles.symptomBox.width
|
||||
const fillerBoxes = []
|
||||
for (let i = 0; i < Math.ceil(n); i++) {
|
||||
fillerBoxes.push(
|
||||
<View
|
||||
width={styles.symptomBox.width}
|
||||
height={0}
|
||||
key={i.toString()}
|
||||
/>
|
||||
)
|
||||
}
|
||||
return fillerBoxes
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user