feat(core): Added support for stacks in layout
This commit is contained in:
parent
85748db201
commit
7ac5a88dff
7 changed files with 114 additions and 45 deletions
20
sites/shared/components/workbench/draft/stack.js
Normal file
20
sites/shared/components/workbench/draft/stack.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
import Part from './part'
|
||||
import { getProps } from './utils'
|
||||
|
||||
const Stack = props => {
|
||||
const { stackName, stack, patternProps, gist, app, updateGist, unsetGist, showInfo } = props
|
||||
|
||||
return (
|
||||
<g {...getProps(stack)} id={`stack-${stackName}`}>
|
||||
{[...stack.parts].map((part) => (
|
||||
<Part {...{ app, gist, updateGist, unsetGist, showInfo }}
|
||||
key={part.name}
|
||||
partName={part.name}
|
||||
part={part}
|
||||
/>
|
||||
))}
|
||||
</g>
|
||||
)
|
||||
}
|
||||
|
||||
export default Stack
|
Loading…
Add table
Add a link
Reference in a new issue