feat(ui): Add image size badge to gallery images

This commit is contained in:
Rohinish 2024-02-01 23:33:04 +05:30 committed by psychedelicious
parent 4688623711
commit 9f19b766a4

View File

@ -1,3 +1,4 @@
import { Text } from '@chakra-ui/react';
import type { SystemStyleObject } from '@invoke-ai/ui-library';
import { Box, Flex, useShiftModifier } from '@invoke-ai/ui-library';
import { useStore } from '@nanostores/react';
@ -144,6 +145,15 @@ const GalleryImage = (props: HoverableImageProps) => {
onMouseOver={handleMouseOver}
onMouseOut={handleMouseOut}
>
<Text
position="absolute"
background="white"
color="black"
fontSize="12px"
bottom={0}
right={0}
px={2}
>{`${imageDTO.width}x${imageDTO.height}`}</Text>
<>
<IAIDndImageIcon onClick={toggleStarredState} icon={starIcon} tooltip={starTooltip} />