1
0
Fork 0

🚧 First beta for 2.1

This commit is contained in:
Joost De Cock 2019-09-29 16:58:21 +02:00
parent 155368e3c7
commit b297dc1b32
12 changed files with 193 additions and 92 deletions

View file

@ -3,18 +3,17 @@ import PropTypes from 'prop-types'
import patterns from './patterns'
const LineDrawing = props => {
return (
<svg
style={props.style}
className={'fs linedrawing ' + props.className}
xmlns="http://www.w3.org/2000/svg"
width={props.size}
height={props.size}
viewBox="0 0 270 270"
>
{patterns[props.pattern].map(el => el)}
</svg>
)
const attr = {
style: props.style,
className: 'fs linedrawing ' + props.className,
xmlns: 'http://www.w3.org/2000/svg',
viewBox: '0 0 270 270'
}
if (props.size) {
attr.width = props.size
attr.height = props.size
}
return <svg {...attr}>{patterns[props.pattern].map(el => el)}</svg>
}
LineDrawing.propTypes = {
@ -24,10 +23,9 @@ LineDrawing.propTypes = {
}
LineDrawing.defaultProps = {
size: 64,
size: false,
className: '',
pattern: 'aaron',
color: false,
style: {}
}