excalidraw/src/components/Avatar.tsx
Danila b50c54f855
Add and use clsx (classnames alternative) (#2249)
Co-authored-by: David Luzar <luzar.david@gmail.com>
2020-10-19 16:14:28 +02:00

15 lines
358 B
TypeScript

import "./Avatar.scss";
import React from "react";
type AvatarProps = {
children: string;
onClick: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
color: string;
};
export const Avatar = ({ children, color, onClick }: AvatarProps) => (
<div className="Avatar" style={{ background: color }} onClick={onClick}>
{children}
</div>
);