1
0
Fork 0

🚧 Added LineDrawing components. Needs linedrawings

This commit is contained in:
Joost De Cock 2019-08-18 16:49:14 +02:00
parent aee6e36cad
commit db082b2240
6 changed files with 96 additions and 0 deletions

View file

@ -0,0 +1,40 @@
import React from 'react'
import PropTypes from 'prop-types'
import patterns from './patterns'
const LineDrawing = props => {
return (
<svg
style={props.style}
className={props.className}
xmlns="http://www.w3.org/2000/svg"
width={props.size}
height={props.size}
viewBox={props.viewBox}
>
<path
stroke="none"
fill={props.color ? props.color : 'currentColor'}
d={patterns[props.pattern]}
/>
</svg>
)
}
LineDrawing.propTypes = {
size: PropTypes.number,
viewBox: PropTypes.string,
pattern: PropTypes.string,
style: PropTypes.object
}
LineDrawing.defaultProps = {
size: 24,
viewBox: '0 0 24 24',
className: '',
pattern: 'github',
color: false,
style: {}
}
export default LineDrawing