Add border to the Avatars (#2428)
This commit is contained in:
parent
b21fd49412
commit
bdb1fb2dae
@ -43,12 +43,13 @@ export const actionGoToCollaborator = register({
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { background } = getClientColors(clientId);
|
const { background, stroke } = getClientColors(clientId);
|
||||||
const shortName = getClientInitials(collaborator.username);
|
const shortName = getClientInitials(collaborator.username);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Avatar
|
<Avatar
|
||||||
color={background}
|
color={background}
|
||||||
|
border={stroke}
|
||||||
onClick={() => updateData(collaborator.pointer)}
|
onClick={() => updateData(collaborator.pointer)}
|
||||||
>
|
>
|
||||||
{shortName}
|
{shortName}
|
||||||
|
@ -6,10 +6,15 @@ type AvatarProps = {
|
|||||||
children: string;
|
children: string;
|
||||||
onClick: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
onClick: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
||||||
color: string;
|
color: string;
|
||||||
|
border: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const Avatar = ({ children, color, onClick }: AvatarProps) => (
|
export const Avatar = ({ children, color, border, onClick }: AvatarProps) => (
|
||||||
<div className="Avatar" style={{ background: color }} onClick={onClick}>
|
<div
|
||||||
|
className="Avatar"
|
||||||
|
style={{ background: color, border: `1px solid ${border}` }}
|
||||||
|
onClick={onClick}
|
||||||
|
>
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user