21 lines
430 B
TypeScript
Raw Normal View History

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-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}
>
{children}
</div>
);