Introduces HorizontalGrid component

This commit is contained in:
mashazyu
2019-11-17 19:57:47 +01:00
committed by Sofiya Tepikin
parent ed66395318
commit 09129adba3
3 changed files with 35 additions and 17 deletions
-14
View File
@@ -2,26 +2,12 @@ import React from 'react'
import PropTypes from 'prop-types'
import { View } from 'react-native'
import { getTickPositions } from '../helpers/chart'
import SymptomIcon from './symptom-icon'
import TickList from './tick-list'
import ChartLegend from './chart-legend'
import styles from './styles'
export function makeHorizontalGrid(columnHeight, symptomRowHeight) {
return getTickPositions(columnHeight).map(tick => {
return (
<View
top={tick + symptomRowHeight}
{...styles.horizontalGrid}
key={tick}
/>
)
})
}
const YAxis = ({ height, symptomsToDisplay, symptomsSectionHeight }) => {
const symptomIconHeight = symptomsSectionHeight / symptomsToDisplay.length
return (