Files
drip/components/chart/chart-line.js
T
Maria Zadnepryanets cf63fbb37c Resolve "Chart"
2020-12-05 10:15:12 +00:00

29 lines
678 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 * 2.5
return (
<Shape d={path} stroke={color} strokeWidth={width} />
)
}
ChartLine.propTypes = {
path: PropTypes.object,
isNfpLine: PropTypes.bool,
}
ChartLine.defaultProps = {
isNfpLine: false
}
export default ChartLine