customize avatar size
This commit is contained in:
parent
bcb273d663
commit
86b58a7e41
@ -1,6 +1,6 @@
|
||||
import React from "react";
|
||||
|
||||
const Avatar = ({ firstName, lastName }) => {
|
||||
const Avatar = ({ firstName, lastName, size='sm' }) => {
|
||||
function generateAvatarText(firstName, lastName) {
|
||||
if (!firstName) return "";
|
||||
if (!lastName || lastName.trim() === "") {
|
||||
@ -27,7 +27,7 @@ const Avatar = ({ firstName, lastName }) => {
|
||||
return (
|
||||
<>
|
||||
<div className="avatar-wrapper p-1">
|
||||
<div className="avatar me-2">
|
||||
<div className={`avatar avatar-${size} me-2`}>
|
||||
<span
|
||||
className={`avatar-initial rounded-circle ${getRandomBootstrapBgClass()}`}
|
||||
>
|
||||
|
Loading…
x
Reference in New Issue
Block a user