|
@@ -4,22 +4,12 @@ import React from "react";
|
|
|
|
|
|
type AvatarProps = {
|
|
type AvatarProps = {
|
|
children: string;
|
|
children: string;
|
|
- className?: string;
|
|
|
|
onClick: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
onClick: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
color: string;
|
|
color: string;
|
|
};
|
|
};
|
|
|
|
|
|
-export const Avatar = ({
|
|
|
|
- children,
|
|
|
|
- className,
|
|
|
|
- color,
|
|
|
|
- onClick,
|
|
|
|
-}: AvatarProps) => (
|
|
|
|
- <div
|
|
|
|
- className={`Avatar ${className}`}
|
|
|
|
- style={{ background: color }}
|
|
|
|
- onClick={onClick}
|
|
|
|
- >
|
|
|
|
|
|
+export const Avatar = ({ children, color, onClick }: AvatarProps) => (
|
|
|
|
+ <div className={`Avatar`} style={{ background: color }} onClick={onClick}>
|
|
{children}
|
|
{children}
|
|
</div>
|
|
</div>
|
|
);
|
|
);
|