1
0
Fork 0

feat(dev): Added react docs for Pattern + refactor

This adds support for not only documenating components, but also
constants and functions that may be exported next to components.
This commit is contained in:
joostdecock 2025-05-25 16:29:57 +02:00
parent d0baf7cece
commit 22a89f12d3
50 changed files with 1816 additions and 669 deletions

View file

@ -1,6 +1,19 @@
import React from 'react'
import { getProps } from './utils.mjs'
/**
* A component to render a FreeSewing Stack inside a pattern
*
* @component
* @param {object} props - All component props
* @param {string} props.stackName - The name of the stack the part belongs to
* @param {object} props.stack - The stack object itself
* @param {object} props.settings - The pattern settings object
* @param {object} props.components - An object holding the pattern components to use
* @param {object} props.strings - An object holding translations
* @param {object} props.drillProps - An object holding extra props to pass down (used in Xray mode)
* @returns {JSX.Element}
*/
export const Stack = ({ stackName, stack, settings, components, strings, drillProps }) => {
const { Group, Part, Grid } = components