Introduces SymptomIcon component

This commit is contained in:
mashazyu
2019-11-17 17:28:02 +01:00
committed by Sofiya Tepikin
parent 34a0e15e66
commit 270b823c20
4 changed files with 41 additions and 11 deletions
+26
View File
@@ -0,0 +1,26 @@
import React from 'react'
import PropTypes from 'prop-types'
import { View } from 'react-native'
import DripIcon from '../../assets/drip-icons'
import styles from './styles'
const SymptomIcon = ({ symptom, height }) => {
return (
<View style={styles.symptomIcon} width={styles.yAxis.width} height={height}>
<DripIcon
size={16}
name={`drip-icon-${symptom}`}
color={styles.iconColors[symptom].color}
/>
</View>
)
}
SymptomIcon.propTypes = {
height: PropTypes.number,
symptom: PropTypes.string,
}
export default SymptomIcon