first commit
This commit is contained in:
12
src/components/UserAvatar.jsx
Normal file
12
src/components/UserAvatar.jsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { Avatar } from '@mui/material';
|
||||
import { stringToColor, initials } from '@/utils/format';
|
||||
|
||||
// ==============================|| INITIALS AVATAR ||============================== //
|
||||
|
||||
export default function UserAvatar({ name = '', size = 32, sx }) {
|
||||
return (
|
||||
<Avatar sx={{ width: size, height: size, bgcolor: stringToColor(name), fontSize: size * 0.42, ...sx }}>
|
||||
{initials(name)}
|
||||
</Avatar>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user