This commit is contained in:
chamikaJ
2025-04-17 18:28:54 +05:30
parent f583291d8a
commit 8825b0410a
2837 changed files with 241385 additions and 127578 deletions

View File

@@ -0,0 +1,25 @@
import Tooltip from 'antd/es/tooltip';
import Avatar from 'antd/es/avatar';
import { AvatarNamesMap } from '../shared/constants';
const CustomAvatar = ({ avatarName, size = 32 }: { avatarName: string; size?: number }) => {
const avatarCharacter = avatarName[0].toUpperCase();
return (
<Tooltip title={avatarName}>
<Avatar
style={{
backgroundColor: AvatarNamesMap[avatarCharacter],
verticalAlign: 'middle',
width: size,
height: size,
}}
>
{avatarCharacter}
</Avatar>
</Tooltip>
);
};
export default CustomAvatar;