1
0
Fork 0
freesewing/sites/shared/components/mdx/legend.mjs
Joost De Cock b8d68811db fix(markdown): Various changes required for the site
This applies a number of changes, typically in how inline MDX components
are handled, including properly naming things (replace pattern when what
we really mean is design) and other tweaks.
2023-10-10 15:43:25 +02:00

23 lines
551 B
JavaScript

import { Legend as LegendDesign } from '@freesewing/legend'
import { ShowPattern } from './tabbed-example.mjs'
export const Legend = ({ caption = false, part = '', children = null }) => {
const settings = {
only: [`legend.${part}`],
measurements: {
head: 370,
},
}
const pattern = new LegendDesign(settings).draft()
const patternProps = {
renderProps: pattern.getRenderProps(),
logs: pattern.getLogs(),
}
return (
<figure className="shadow p-2">
<ShowPattern {...patternProps} />
</figure>
)
}