Files
drip/components/chart/chart-line.js
T
Maria Zadnepryanets 5a555f5965 Calendar redesign
2020-08-22 13:08:24 +02:00

29 lines
672 B
JavaScript

import React from 'react'
import PropTypes from 'prop-types'
import { Shape } from 'react-native/Libraries/ART/ReactNativeART'
import { Colors } from '../../styles'
import { CHART_STROKE_WIDTH, CHART_GRID_LINE_HORIZONTAL_WIDTH } from '../../config'
const ChartLine = ({ path, isNfpLine }) => {
const color = isNfpLine ? Colors.orange : Colors.grey
const width = isNfpLine
? CHART_STROKE_WIDTH : CHART_GRID_LINE_HORIZONTAL_WIDTH
return (
<Shape d={path} stroke={color} strokeWidth={width} />
)
}
ChartLine.propTypes = {
path: PropTypes.object,
isNfpLine: PropTypes.bool,
}
ChartLine.defaultProps = {
isNfpLine: false
}
export default ChartLine