Skip to content

Commit

Permalink
spread rest on Avatar
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSonOfThomp committed May 3, 2024
1 parent 9eaafd2 commit fa6e5c6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/avatar/src/Avatar/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,20 @@ import { AvatarContents } from './AvatarContents';

export const Avatar = forwardRef<HTMLDivElement, AvatarProps>(
(props, fwdRef) => {
const { darkMode, format, size = Size.Default, sizeOverride } = props;
const {
darkMode,
format,
size = Size.Default,
sizeOverride,
...rest
} = props;
const { theme } = useDarkMode(darkMode);

return (
<div
ref={fwdRef}
className={getAvatarStyles({ size, theme, format, sizeOverride })}
{...rest}
>
<AvatarContents {...props} />
</div>
Expand Down

0 comments on commit fa6e5c6

Please sign in to comment.