1
0
Fork 0
freesewing/packages/components/src/LineDrawing/index.js

35 lines
663 B
JavaScript
Raw Normal View History

import React from 'react'
import PropTypes from 'prop-types'
import patterns from './patterns'
const LineDrawing = props => {
return (
<svg
style={props.style}
2019-08-20 19:06:01 +02:00
className={'fs linedrawing ' + props.className}
xmlns="http://www.w3.org/2000/svg"
width={props.size}
height={props.size}
2019-08-20 19:06:01 +02:00
viewBox="0 0 270 270"
>
2019-08-20 19:06:01 +02:00
{patterns[props.pattern].map(el => el)}
</svg>
)
}
LineDrawing.propTypes = {
size: PropTypes.number,
pattern: PropTypes.string,
style: PropTypes.object
}
LineDrawing.defaultProps = {
2019-08-20 19:06:01 +02:00
size: 64,
className: '',
2019-08-20 19:06:01 +02:00
pattern: 'aaron',
color: false,
style: {}
}
export default LineDrawing