fix(ui): logic to remove badge for small image size

This commit is contained in:
Rohinish 2024-02-20 13:00:08 +05:30 committed by psychedelicious
parent 9f19b766a4
commit e076898798

View File

@ -122,7 +122,10 @@ const GalleryImage = (props: HoverableImageProps) => {
} }
return ( return (
<Box w="full" h="full" className="gallerygrid-image" data-testid={dataTestId}> <Box w="full" h="full" className="gallerygrid-image" data-testid={dataTestId}
sx={{
containerType: "inline-size",
}}>
<Flex <Flex
ref={imageContainerRef} ref={imageContainerRef}
userSelect="none" userSelect="none"
@ -153,6 +156,11 @@ const GalleryImage = (props: HoverableImageProps) => {
bottom={0} bottom={0}
right={0} right={0}
px={2} px={2}
sx={{
"@container (max-width: 80px)": {
"&": { display: "none" },
},
}}
>{`${imageDTO.width}x${imageDTO.height}`}</Text> >{`${imageDTO.width}x${imageDTO.height}`}</Text>
<> <>
<IAIDndImageIcon onClick={toggleStarredState} icon={starIcon} tooltip={starTooltip} /> <IAIDndImageIcon onClick={toggleStarredState} icon={starIcon} tooltip={starTooltip} />