🚧 Added LineDrawing components. Needs linedrawings
This commit is contained in:
parent
aee6e36cad
commit
db082b2240
6 changed files with 96 additions and 0 deletions
40
packages/components/src/LineDrawing/index.js
Normal file
40
packages/components/src/LineDrawing/index.js
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue