Skip to content

Commit 7fecebf

Browse files
psychedelicioushipsterusername
authored andcommitted
feat(ui): add greyscale invoke logo to invoke button when as icon
1 parent b915d74 commit 7fecebf

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { Box, Image } from '@chakra-ui/react';
2+
import InvokeAILogoImage from 'assets/images/logo.png';
3+
import { memo } from 'react';
4+
5+
const GreyscaleInvokeAIIcon = () => (
6+
<Box pos="relative" w={4} h={4}>
7+
<Image
8+
src={InvokeAILogoImage}
9+
alt="invoke-ai-logo"
10+
pos="absolute"
11+
top={-0.5}
12+
insetInlineStart={-0.5}
13+
w={5}
14+
h={5}
15+
minW={5}
16+
minH={5}
17+
filter="saturate(0)"
18+
/>
19+
</Box>
20+
);
21+
22+
export default memo(GreyscaleInvokeAIIcon);

invokeai/frontend/web/src/features/queue/components/QueueBackButton.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
import { ChakraProps } from '@chakra-ui/react';
12
import { memo } from 'react';
23
import { useTranslation } from 'react-i18next';
34
import { useQueueBack } from '../hooks/useQueueBack';
45
import EnqueueButtonTooltip from './QueueButtonTooltip';
56
import QueueButton from './common/QueueButton';
6-
import { ChakraProps } from '@chakra-ui/react';
7+
import GreyscaleInvokeAIIcon from 'common/components/GreyscaleInvokeAIIcon';
78

89
type Props = {
910
asIconButton?: boolean;
@@ -23,6 +24,7 @@ const QueueBackButton = ({ asIconButton, sx }: Props) => {
2324
onClick={queueBack}
2425
tooltip={<EnqueueButtonTooltip />}
2526
sx={sx}
27+
icon={asIconButton ? <GreyscaleInvokeAIIcon /> : undefined}
2628
/>
2729
);
2830
};

0 commit comments

Comments
 (0)