2020-06-19 11:36:49 +01:00
|
|
|
import "./Avatar.scss";
|
|
|
|
|
|
|
|
import React from "react";
|
|
|
|
|
|
|
|
type AvatarProps = {
|
|
|
|
children: string;
|
|
|
|
onClick: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
|
|
color: string;
|
2020-11-29 20:19:06 +02:00
|
|
|
border: string;
|
2020-06-19 11:36:49 +01:00
|
|
|
};
|
|
|
|
|
2020-11-29 20:19:06 +02:00
|
|
|
export const Avatar = ({ children, color, border, onClick }: AvatarProps) => (
|
|
|
|
<div
|
|
|
|
className="Avatar"
|
|
|
|
style={{ background: color, border: `1px solid ${border}` }}
|
|
|
|
onClick={onClick}
|
|
|
|
>
|
2020-06-19 11:36:49 +01:00
|
|
|
{children}
|
|
|
|
</div>
|
|
|
|
);
|