1
0
Fork 0
freesewing/packages/react/components/Pattern/stack.mjs

18 lines
608 B
JavaScript
Raw Normal View History

2023-09-29 18:20:28 +02:00
// __SDEFILE__ - This file is a dependency for the stand-alone environment
2023-06-07 10:06:30 -05:00
// eslint-disable-next-line no-unused-vars
import React from 'react'
import { getProps } from './utils.mjs'
2025-03-01 14:28:34 +01:00
export const Stack = ({ stackName, stack, settings, components, t, drillProps }) => {
const { Group, Part, Grid } = components
return (
<Group {...getProps(stack)}>
2025-03-01 14:28:34 +01:00
{settings[0].paperless ? <Grid {...{ stack, stackName, drillProps }} /> : null}
{[...stack.parts].map((part, key) => (
2025-03-01 14:28:34 +01:00
<Part {...{ settings, components, t, part, stackName, drillProps }} key={key} />
))}
</Group>
)
}