1
0
Fork 0
freesewing/packages/react/components/Pattern/stack.mjs
Jonathan Haas 647205661b [react] fix: the inspect view popup when clicking on a path or point, fix missing translations in the xray path and point components ()
This fixes some react wiring in the inspect view.

The drillProps argument contains the info function which displays the popup. Also `strings` should be passed for translation, instead of the t function.

Reviewed-on: https://codeberg.org/freesewing/freesewing/pulls/256
Reviewed-by: Joost De Cock <joostdecock@noreply.codeberg.org>
Co-authored-by: Jonathan Haas <haasjona@gmail.com>
Co-committed-by: Jonathan Haas <haasjona@gmail.com>
2025-04-18 06:22:16 +00:00

15 lines
489 B
JavaScript

import React from 'react'
import { getProps } from './utils.mjs'
export const Stack = ({ stackName, stack, settings, components, strings, drillProps }) => {
const { Group, Part, Grid } = components
return (
<Group {...getProps(stack)}>
{settings[0].paperless ? <Grid {...{ stack, stackName }} /> : null}
{[...stack.parts].map((part, key) => (
<Part {...{ settings, components, part, stackName, strings, drillProps }} key={key} />
))}
</Group>
)
}