Просмотр исходного кода

fix(demo): node width set to 360px (#498)

Louis Young 6 месяцев назад
Родитель
Сommit
c65d1093b7

+ 1 - 2
apps/demo-free-layout/src/components/base-node/styles.tsx

@@ -16,8 +16,7 @@ export const NodeWrapperStyle = styled.div`
   flex-direction: column;
   justify-content: center;
   position: relative;
-  min-width: 360px;
-  width: 100%;
+  width: 360px;
   height: auto;
 
   &.selected {

+ 1 - 0
apps/demo-free-layout/src/nodes/block-end/index.ts

@@ -23,6 +23,7 @@ export const BlockEndNodeRegistry: FlowNodeRegistry = {
     },
     wrapperStyle: {
       minWidth: 'unset',
+      width: '100%',
       borderWidth: 2,
       borderRadius: 12,
       cursor: 'move',

+ 1 - 0
apps/demo-free-layout/src/nodes/block-start/index.ts

@@ -23,6 +23,7 @@ export const BlockStartNodeRegistry: FlowNodeRegistry = {
     },
     wrapperStyle: {
       minWidth: 'unset',
+      width: '100%',
       borderWidth: 2,
       borderRadius: 12,
       cursor: 'move',

+ 1 - 0
apps/demo-free-layout/src/nodes/loop/index.ts

@@ -64,6 +64,7 @@ export const LoopNodeRegistry: FlowNodeRegistry = {
     expandable: false, // disable expanded
     wrapperStyle: {
       minWidth: 'unset',
+      width: '100%',
     },
   },
   onAdd() {