mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
15 lines
358 B
TypeScript
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>
|
|
);
|