Skip to content

Commit f706266

Browse files
committed
fix: code0 props are now parsed to component
1 parent 7f9014d commit f706266

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/avatar/Avatar.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React from "react";
22
import {Code0Component} from "../../utils/types";
33
import {md5} from 'js-md5';
44
import "./Avatar.style.scss"
5+
import {mergeCode0Props} from "../../utils/utils";
56

67
interface AvatarImageProps {
78
src: string
@@ -85,9 +86,9 @@ const AvatarIdenticon: React.FC<AvatarIdenticonProps> = ({identifier, size}) =>
8586

8687
const Avatar: React.FC<AvatarProps> = (props: AvatarProps) => {
8788

88-
const {identifier, src, size = 25} = props
89+
const {identifier, src, size = 25, ...rest} = props
8990

90-
return <div className={`avatar ${!identifier && src ? "avatar--image" : ""}`}>
91+
return <div {...mergeCode0Props(`avatar ${!identifier && src ? "avatar--image" : ""}`, rest)}>
9192
{identifier ?
9293
<AvatarIdenticon identifier={identifier} size={size}/> :
9394
src ? <AvatarImage src={src} size={size + 13}/> : null

0 commit comments

Comments
 (0)