feat: moving props spread

This commit is contained in:
Chubby Granny Chaser 2025-03-04 20:10:04 +00:00
parent 69f4ce821f
commit f522a7c9ef
No known key found for this signature in database

View file

@ -1,4 +1,5 @@
import { PersonIcon } from "@primer/octicons-react";
import cn from "classnames";
import "./avatar.scss";
@ -14,17 +15,17 @@ export interface AvatarProps
src?: string | null;
}
export function Avatar({ size, alt, src, ...props }: AvatarProps) {
export function Avatar({ size, alt, src, className, ...props }: AvatarProps) {
return (
<div className="profile-avatar" style={{ width: size, height: size }}>
{src ? (
<img
{...props}
className="profile-avatar__image"
className={cn("profile-avatar__image", className)}
alt={alt}
src={src}
width={size}
height={size}
{...props}
/>
) : (
<PersonIcon size={size * 0.7} />