Skip to content

Commit ded8a84

Browse files
feat(ui): increase spacing in form builder view mode
1 parent 94771ea commit ded8a84

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

invokeai/frontend/web/src/features/nodes/components/sidePanel/builder/ContainerElement.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const ContainerElement = memo(({ id }: { id: string }) => {
5050
ContainerElement.displayName = 'ContainerElementComponent';
5151

5252
const containerViewModeSx: SystemStyleObject = {
53-
gap: 4,
53+
gap: 2,
5454
'&[data-self-layout="column"]': {
5555
flexDir: 'column',
5656
alignItems: 'stretch',
@@ -197,7 +197,7 @@ const rootViewModeSx: SystemStyleObject = {
197197
borderRadius: 'base',
198198
w: 'full',
199199
h: 'full',
200-
gap: 4,
200+
gap: 2,
201201
display: 'flex',
202202
flex: 1,
203203
maxW: '768px',
@@ -232,6 +232,7 @@ RootContainerElementViewMode.displayName = 'RootContainerElementViewMode';
232232

233233
const rootEditModeSx: SystemStyleObject = {
234234
...rootViewModeSx,
235+
gap: 4,
235236
'&[data-is-dragging-over="true"]': {
236237
opacity: 1,
237238
bg: 'base.850',

invokeai/frontend/web/src/features/nodes/components/sidePanel/builder/NodeFieldElementViewMode.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ const sx: SystemStyleObject = {
2020
flex: '1 1 0',
2121
minW: 32,
2222
},
23+
'&[data-with-description="false"]': {
24+
pb: 2,
25+
},
2326
};
2427

2528
export const NodeFieldElementViewMode = memo(({ el }: { el: NodeFieldElement }) => {
@@ -35,7 +38,13 @@ export const NodeFieldElementViewMode = memo(({ el }: { el: NodeFieldElement })
3538
);
3639

3740
return (
38-
<Flex id={id} className={NODE_FIELD_CLASS_NAME} sx={sx} data-parent-layout={containerCtx.layout}>
41+
<Flex
42+
id={id}
43+
className={NODE_FIELD_CLASS_NAME}
44+
sx={sx}
45+
data-parent-layout={containerCtx.layout}
46+
data-with-description={showDescription && !!_description}
47+
>
3948
<FormControl flex="1 1 0" orientation="vertical">
4049
<NodeFieldElementLabel el={el} />
4150
<Flex w="full" gap={4}>

0 commit comments

Comments
 (0)