mirror of https://github.com/buster-so/buster.git
AVatar tooltip is the default
This commit is contained in:
parent
4bb83dbf17
commit
65c08cd641
|
@ -12,16 +12,17 @@ export interface AvatarProps {
|
|||
fallbackClassName?: string;
|
||||
useToolTip?: boolean;
|
||||
size?: number;
|
||||
tooltipTitle?: string | React.ReactNode;
|
||||
}
|
||||
|
||||
export const Avatar: React.FC<AvatarProps> = React.memo(
|
||||
({ image, name, className, useToolTip, size, fallbackClassName }) => {
|
||||
({ image, name, className, useToolTip = true, size, fallbackClassName, tooltipTitle }) => {
|
||||
const hasName = !!name;
|
||||
const nameLetters = createNameLetters(name);
|
||||
const hasImage = !!image;
|
||||
|
||||
return (
|
||||
<Tooltip delayDuration={300} title={useToolTip ? name || '' : ''}>
|
||||
<Tooltip delayDuration={300} title={useToolTip ? tooltipTitle || name || '' : ''}>
|
||||
<AvatarBase
|
||||
className={className}
|
||||
style={{
|
||||
|
|
Loading…
Reference in New Issue