Skip to content

Commit f51e8ee

Browse files
fix(ui): better node footer spacing
1 parent 6e06935 commit f51e8ee

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

invokeai/frontend/web/src/common/components/InvControl/InvControl.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export const InvControl = memo(
4545
orientation={orientation}
4646
isDisabled={isDisabled}
4747
{...formControlProps}
48+
{...ctx.controlProps}
4849
>
4950
<Flex className="invcontrol-label-wrapper">
5051
{label && (

invokeai/frontend/web/src/common/components/InvControl/InvControlGroup.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import type { FormLabelProps } from '@chakra-ui/react';
1+
import type { FormControlProps, FormLabelProps } from '@chakra-ui/react';
22
import type { PropsWithChildren } from 'react';
33
import { createContext, memo } from 'react';
44

55
export type InvControlGroupProps = {
66
labelProps?: FormLabelProps;
7+
controlProps?: FormControlProps;
78
isDisabled?: boolean;
89
orientation?: 'horizontal' | 'vertical';
910
};

invokeai/frontend/web/src/features/nodes/components/flow/nodes/Invocation/InvocationNodeFooter.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
import type { ChakraProps } from '@chakra-ui/react';
12
import { Flex } from '@chakra-ui/react';
3+
import { InvControlGroup } from 'common/components/InvControl/InvControlGroup';
24
import { useHasImageOutput } from 'features/nodes/hooks/useHasImageOutput';
35
import { DRAG_HANDLE_CLASSNAME } from 'features/nodes/types/constants';
46
import { useFeatureStatus } from 'features/system/hooks/useFeatureStatus';
@@ -11,6 +13,8 @@ type Props = {
1113
nodeId: string;
1214
};
1315

16+
const props: ChakraProps = { w: 'unset' };
17+
1418
const InvocationNodeFooter = ({ nodeId }: Props) => {
1519
const hasImageOutput = useHasImageOutput(nodeId);
1620
const isCacheEnabled = useFeatureStatus('invocationCache').isFeatureEnabled;
@@ -20,13 +24,16 @@ const InvocationNodeFooter = ({ nodeId }: Props) => {
2024
layerStyle="nodeFooter"
2125
w="full"
2226
borderBottomRadius="base"
27+
gap={4}
2328
px={2}
2429
py={0}
2530
h={8}
2631
justifyContent="space-between"
2732
>
28-
{isCacheEnabled && <UseCacheCheckbox nodeId={nodeId} />}
29-
{hasImageOutput && <SaveToGalleryCheckbox nodeId={nodeId} />}
33+
<InvControlGroup controlProps={props} labelProps={props}>
34+
{isCacheEnabled && <UseCacheCheckbox nodeId={nodeId} />}
35+
{hasImageOutput && <SaveToGalleryCheckbox nodeId={nodeId} />}
36+
</InvControlGroup>
3037
</Flex>
3138
);
3239
};

0 commit comments

Comments
 (0)