2023-05-19 11:46:17 +02:00
|
|
|
import { Legend as LegendDesign } from '@freesewing/legend'
|
2023-10-10 15:43:25 +02:00
|
|
|
import { ShowPattern } from './tabbed-example.mjs'
|
2023-05-19 11:46:17 +02:00
|
|
|
|
2023-10-10 15:47:19 +02:00
|
|
|
export const Legend = ({ part = '' }) => {
|
2023-05-19 11:46:17 +02:00
|
|
|
const settings = {
|
|
|
|
only: [`legend.${part}`],
|
|
|
|
measurements: {
|
|
|
|
head: 370,
|
|
|
|
},
|
|
|
|
}
|
2023-07-17 11:40:45 -05:00
|
|
|
const pattern = new LegendDesign(settings).draft()
|
|
|
|
|
|
|
|
const patternProps = {
|
|
|
|
renderProps: pattern.getRenderProps(),
|
|
|
|
logs: pattern.getLogs(),
|
|
|
|
}
|
|
|
|
|
2023-05-19 11:46:17 +02:00
|
|
|
return (
|
2023-10-10 15:43:25 +02:00
|
|
|
<figure className="shadow p-2">
|
|
|
|
<ShowPattern {...patternProps} />
|
2023-05-19 11:46:17 +02:00
|
|
|
</figure>
|
|
|
|
)
|
|
|
|
}
|