🐛 Remove unnecessary class name props (#2027)
It's unused and serialized to `undefined`.
This commit is contained in:
parent
41cb1fbeba
commit
14317c2232
@ -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>
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user