From 6e461dd8c3a77934680b0e7546649f30b42cb8d3 Mon Sep 17 00:00:00 2001 From: Prateek Shourya Date: Tue, 7 Nov 2023 18:17:44 +0530 Subject: [PATCH] style: update user profile button alignment. (#2695) --- packages/ui/src/avatar/avatar.tsx | 11 ++++++++--- web/components/workspace/sidebar-dropdown.tsx | 6 +++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/packages/ui/src/avatar/avatar.tsx b/packages/ui/src/avatar/avatar.tsx index 2c6b5b9a3..674d82a26 100644 --- a/packages/ui/src/avatar/avatar.tsx +++ b/packages/ui/src/avatar/avatar.tsx @@ -42,6 +42,10 @@ type Props = { * The source of the avatar image */ src?: string; + /** + * The custom CSS class name to apply to the component + */ + className?: string; }; /** @@ -94,7 +98,7 @@ export const getBorderRadius = (shape: "circle" | "square") => { case "circle": return "rounded-full"; case "square": - return "rounded-md"; + return "rounded"; default: return "rounded-full"; } @@ -119,6 +123,7 @@ export const Avatar: React.FC = (props) => { size = "md", shape = "circle", src, + className = "" } = props; // get size details based on the size prop @@ -145,14 +150,14 @@ export const Avatar: React.FC = (props) => { {src ? ( {name} ) : (
{ return (
- - + +
{ {!themeStore.sidebarCollapsed && ( - +