🐛 Remove unnecessary class name props (#2027)

It's unused and serialized to `undefined`.
This commit is contained in:
Warren Seine 2020-08-14 20:05:29 +02:00 committed by GitHub
parent 41cb1fbeba
commit 14317c2232
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 = ({ export const Avatar = ({ children, color, onClick }: AvatarProps) => (
children, <div className={`Avatar`} style={{ background: color }} onClick={onClick}>
className,
color,
onClick,
}: AvatarProps) => (
<div
className={`Avatar ${className}`}
style={{ background: color }}
onClick={onClick}
>
{children} {children}
</div> </div>
); );