diff --git a/invokeai/frontend/web/src/features/gallery/components/ImageGrid/GalleryImage.tsx b/invokeai/frontend/web/src/features/gallery/components/ImageGrid/GalleryImage.tsx index 866b3013f2..cf6f285b26 100644 --- a/invokeai/frontend/web/src/features/gallery/components/ImageGrid/GalleryImage.tsx +++ b/invokeai/frontend/web/src/features/gallery/components/ImageGrid/GalleryImage.tsx @@ -1,6 +1,5 @@ -import { Text } from '@chakra-ui/react'; import type { SystemStyleObject } from '@invoke-ai/ui-library'; -import { Box, Flex, useShiftModifier } from '@invoke-ai/ui-library'; +import { Box, Flex, Text, useShiftModifier } from '@invoke-ai/ui-library'; import { useStore } from '@nanostores/react'; import { $customStarUI } from 'app/store/nanostores/customStarUI'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; @@ -23,6 +22,16 @@ const imageIconStyleOverrides: SystemStyleObject = { bottom: 2, top: 'auto', }; +const boxSx: SystemStyleObject = { + containerType: 'inline-size', +}; + +const badgeSx: SystemStyleObject = { + '@container (max-width: 80px)': { + '&': { display: 'none' }, + }, +}; + interface HoverableImageProps { imageName: string; index: number; @@ -122,10 +131,7 @@ const GalleryImage = (props: HoverableImageProps) => { } return ( - + { onMouseOver={handleMouseOver} onMouseOut={handleMouseOut} > - {`${imageDTO.width}x${imageDTO.height}`} <> + {isHovered && ( + {`${imageDTO.width}x${imageDTO.height}`})} {isHovered && shift && (