1
0
Fork 0

feat(components: Added Legend component

This commit is contained in:
Joost De Cock 2020-07-04 17:48:45 +02:00
parent b09ebe5a5e
commit c3f07dd123
5 changed files with 1867 additions and 1 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -52,7 +52,7 @@ const Example = ({
}
settings = {
options: { ...options },
measurements: { headCircumference: 390 },
measurements: { head: 390 },
...settings
}
if (part !== '') settings.only = [part]

View file

@ -0,0 +1,25 @@
import React from 'react'
import LegendPattern from '@freesewing/legend'
import Draft from '../Draft'
const Legend = ({ caption = '', part = '' }) => {
const patternProps = new LegendPattern({
only: part,
measurements: {
head: 370
}
})
.draft()
.getRenderProps()
return (
<figure>
<div className="shadow">
<Draft {...patternProps} />
</div>
<figcaption>{caption}</figcaption>
</figure>
)
}
export default Legend

View file

@ -6,6 +6,7 @@ export default [
'Example',
'Footer',
'Icon',
'Legend',
'LineDrawing',
'Logo',
'Navbar',