Introduces ChartLine component

This commit is contained in:
mashazyu
2019-11-18 13:36:59 +01:00
parent 03a235d8cb
commit 71e4c6d11e
2 changed files with 40 additions and 24 deletions
+28
View File
@@ -0,0 +1,28 @@
import React from 'react'
import PropTypes from 'prop-types'
import { Shape } from 'react-native/Libraries/ART/ReactNativeART'
import styles from './styles'
const ChartLine = ({ path, isNfpLine = false }) => {
const strokeStyle =
isNfpLine ? styles.nfpLine.stroke : styles.column.stroke.color
const strokeWidth =
isNfpLine ? styles.nfpLine.strokeWidth : styles.column.stroke.width
return (
<Shape
stroke={strokeStyle}
strokeWidth={strokeWidth}
d={path}
/>
)
}
ChartLine.propTypes = {
path: PropTypes.object,
isNfpLine: PropTypes.bool,
}
export default ChartLine