avatr contain

This commit is contained in:
yohlo
2025-09-26 12:55:04 -05:00
parent ea6656aa33
commit 39053cadaa
9 changed files with 20 additions and 4 deletions

View File

@@ -18,6 +18,7 @@ interface AvatarProps
radius?: string | number;
withBorder?: boolean;
disableFullscreen?: boolean;
contain?: boolean;
}
const Avatar = ({
@@ -26,6 +27,7 @@ const Avatar = ({
radius = "100%",
withBorder = true,
disableFullscreen = false,
contain = false,
...props
}: AvatarProps) => {
const [isFullscreenOpen, setIsFullscreenOpen] = useState(false);
@@ -67,7 +69,7 @@ const Avatar = ({
w={size}
styles={{
image: {
objectFit: "contain",
objectFit: contain ? 'contain' : 'cover',
},
}}
{...props}