Skip to content

Commit 057f497

Browse files
feat(@clayui/card): add ability to change symbol for user icon
1 parent fbe4106 commit 057f497

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/clay-card/src/CardWithUser.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@ interface IProps {
8080
* Path to the user's image
8181
*/
8282
userImageSrc?: string;
83+
84+
/**
85+
* Icon name to use for user avatar
86+
*/
87+
userSymbol?: string;
8388
}
8489

8590
export const ClayCardWithUser: React.FunctionComponent<IProps> = ({
@@ -96,6 +101,7 @@ export const ClayCardWithUser: React.FunctionComponent<IProps> = ({
96101
spritemap,
97102
userDisplayType,
98103
userImageSrc,
104+
userSymbol = 'user',
99105
}: IProps) => {
100106
const content = (
101107
<div className="aspect-ratio-item-center-middle card-type-asset-icon">
@@ -112,7 +118,7 @@ export const ClayCardWithUser: React.FunctionComponent<IProps> = ({
112118
/>
113119
)}
114120
{!userImageSrc && (
115-
<ClayIcon spritemap={spritemap} symbol="user" />
121+
<ClayIcon spritemap={spritemap} symbol={userSymbol} />
116122
)}
117123
</ClaySticker>
118124
</div>

0 commit comments

Comments
 (0)