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
|
2023-06-01 18:28:22 +02:00
|
|
|
import React from 'react'
|
|
|
|
import { getProps } from './utils.mjs'
|
|
|
|
|
|
|
|
export const Stack = ({ stackName, stack, settings, components, t }) => {
|
2023-06-04 17:28:02 +02:00
|
|
|
const { Group, Part, Grid } = components
|
2023-06-01 18:28:22 +02:00
|
|
|
|
|
|
|
return (
|
|
|
|
<Group {...getProps(stack)}>
|
2023-06-04 17:28:02 +02:00
|
|
|
{settings[0].paperless ? <Grid {...{ stack, stackName }} /> : null}
|
2023-06-02 18:21:40 +02:00
|
|
|
{[...stack.parts].map((part, key) => (
|
2023-06-07 10:06:30 -05:00
|
|
|
<Part {...{ settings, components, t, part, stackName }} key={key} />
|
2023-06-01 18:28:22 +02:00
|
|
|
))}
|
|
|
|
</Group>
|
|
|
|
)
|
|
|
|
}
|