From 4fff48a087a00faadfb5ca036ee8709c146fc16c Mon Sep 17 00:00:00 2001
From: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
Date: Thu, 9 Nov 2023 05:52:53 +0700
Subject: [PATCH] fix(client): profile image size and alignment (#52263)
---
client/src/components/helpers/avatar-renderer.tsx | 2 +-
tools/ui-components/src/image/image.tsx | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/client/src/components/helpers/avatar-renderer.tsx b/client/src/components/helpers/avatar-renderer.tsx
index 633c32147c2..1b9a8fa3258 100644
--- a/client/src/components/helpers/avatar-renderer.tsx
+++ b/client/src/components/helpers/avatar-renderer.tsx
@@ -46,7 +46,7 @@ function AvatarRenderer({
{isPlaceHolderImage ? (
) : (
-
+
)}
);
diff --git a/tools/ui-components/src/image/image.tsx b/tools/ui-components/src/image/image.tsx
index 92dabc9fae3..b561dfd90c5 100644
--- a/tools/ui-components/src/image/image.tsx
+++ b/tools/ui-components/src/image/image.tsx
@@ -2,16 +2,16 @@ import React from 'react';
import { ImageProps } from './image.types';
export const Image = React.forwardRef(
- ({ alt, src, responsive, ...props }, ref): JSX.Element => {
+ ({ alt, src, responsive, className, ...props }, ref): JSX.Element => {
// If `responsive` is `true`:
// - Set `display` to `block`
- // - Set a maximum relative to the parent
+ // - Set a maximum width relative to the parent
// - Scale the height according to the width, otherwise the image is stretched
- const className = responsive ? 'block max-w-full h-auto' : '';
+ const classes = responsive
+ ? [className, 'block max-w-full h-auto'].join(' ')
+ : className;
- return (
-
- );
+ return
;
}
);