Skip to content

Commit 0b803a6

Browse files
committed
fix avatar for account hash
1 parent 3d887a3 commit 0b803a6

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

dist/cspr-design.es.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,7 +1304,7 @@ const g3 = (e, t, n = 20, r = 5) => {
13041304
hash: i,
13051305
src: o,
13061306
size: s = "default",
1307-
transparentBg: a,
1307+
transparentBg: a = !1,
13081308
...l
13091309
} = t, c = xn(s), u = 2, d = "86400";
13101310
if (r || !i && !o)
@@ -1326,7 +1326,7 @@ const g3 = (e, t, n = 20, r = 5) => {
13261326
height: c
13271327
} }) }) });
13281328
}
1329-
return i && y3(i) ? /* @__PURE__ */ h("span", { ref: n, ...l, children: /* @__PURE__ */ h(en, { sizeType: s, withBgColor: a, children: /* @__PURE__ */ h(w3, { children: /* @__PURE__ */ h(ve, { src: Gl, size: c - 8 }) }) }) }) : /* @__PURE__ */ h("span", { ref: n, ...l, children: /* @__PURE__ */ h(en, { sizeType: s, children: i && /* @__PURE__ */ h(v3, { hexString: i, size: c, ...l }) }) });
1329+
return i && y3(i) ? /* @__PURE__ */ h("span", { ref: n, ...l, children: /* @__PURE__ */ h(en, { sizeType: s, withBgColor: !a, children: /* @__PURE__ */ h(w3, { children: /* @__PURE__ */ h(ve, { src: Gl, size: c - 8 }) }) }) }) : /* @__PURE__ */ h("span", { ref: n, ...l, children: /* @__PURE__ */ h(en, { sizeType: s, children: i && /* @__PURE__ */ h(v3, { hexString: i, size: c, ...l }) }) });
13301330
});
13311331
function b3(e, t, n) {
13321332
return t in e ? Object.defineProperty(e, t, {

dist/cspr-design.umd.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/lib/components/address/address.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const meta = {
77
title: 'Components/Display/Address',
88
// tags: ['autodocs', '!dev'],
99
args: {
10-
hash: '01f5f1fa995ab7e966428e5a1aed797526ad5b2454c50a63a7aaa2dfeae6a996c2',
10+
hash: '21eaea584903e79365bcb1f7607179cc118807033c8919cff7489a91c3a822d1',
1111
minifiedCopyNotification: true,
1212
tooltipCaption: 'public key',
1313
avatarSize: 'default',

src/lib/components/avatar/avatar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export const Avatar = React.forwardRef<Ref, AvatarProps>(function Avatar(
114114
hash,
115115
src,
116116
size = 'default',
117-
transparentBg,
117+
transparentBg = false,
118118
...restProps
119119
} = props;
120120
const avatarSize = getSize(size);
@@ -158,7 +158,7 @@ export const Avatar = React.forwardRef<Ref, AvatarProps>(function Avatar(
158158
if (hash && isValidAccountHash(hash)) {
159159
return (
160160
<span ref={ref} {...restProps}>
161-
<BackgroundWrapper sizeType={size} withBgColor={transparentBg}>
161+
<BackgroundWrapper sizeType={size} withBgColor={!transparentBg}>
162162
<IconHashWrapper>
163163
<SvgIcon src={HashIcon} size={avatarSize - 8} />
164164
</IconHashWrapper>

0 commit comments

Comments
 (0)