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-08-14 20:05:29 +02:00
|
|
|
export const Avatar = ({ children, color, onClick }: AvatarProps) => (
|
2020-10-19 17:14:28 +03:00
|
|
|
<div className="Avatar" style={{ background: color }} onClick={onClick}>
|
2020-06-19 11:36:49 +01:00
|
|
|
{children}
|
|
|
|
</div>
|
|
|
|
);
|