@brighthr/component-avatar
Advanced tools
Comparing version 1.1.7 to 1.1.8
@@ -25,2 +25,4 @@ // src/index.tsx | ||
useEffect(() => { | ||
if (!src) | ||
return; | ||
const tmp = new Image(); | ||
@@ -96,2 +98,3 @@ tmp.onload = () => { | ||
const image = useImage(imageHref); | ||
const altText = !name ? "Profile" : `${name}'s profile`; | ||
return /* @__PURE__ */ React.createElement("div", { className: cn("relative inline-block") }, image.loaded ? /* @__PURE__ */ React.createElement( | ||
@@ -101,3 +104,3 @@ "img", | ||
src: imageHref, | ||
title: `${name}'s profile`, | ||
title: altText, | ||
className: cn( | ||
@@ -107,3 +110,3 @@ "max-w-none inline object-cover rounded-full", | ||
), | ||
alt: `${name}'s profile` | ||
alt: altText | ||
} | ||
@@ -110,0 +113,0 @@ ) : /* @__PURE__ */ React.createElement(BaseAvatar, { name, size }), presence && /* @__PURE__ */ React.createElement("span", { className: cn(presenceClassNames(presence, size)) }, "\xA0")); |
{ | ||
"name": "@brighthr/component-avatar", | ||
"version": "1.1.7", | ||
"version": "1.1.8", | ||
"license": "MIT", | ||
@@ -26,3 +26,3 @@ "type": "module", | ||
}, | ||
"gitHead": "1bf6a053fca38842b0e5f0b00e15e09650a98c57" | ||
"gitHead": "bcd07ab15fdbeef3eef72b37132eef15358e45a3" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23887
245