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 && ( - +