frst-components 0.22.97 → 0.22.98
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2172,7 +2172,7 @@ const AvatarImg$1 = styled__default["default"].img `
|
|
|
2172
2172
|
height: ${(props) => props.size || '120px'};
|
|
2173
2173
|
border-radius: 50%;
|
|
2174
2174
|
object-fit: cover;
|
|
2175
|
-
background-image: url('https://cdn-images.frstfalconi.cloud/
|
|
2175
|
+
background-image: url('https://cdn-images.frstfalconi.cloud/path582.svg');
|
|
2176
2176
|
background-size: cover;
|
|
2177
2177
|
|
|
2178
2178
|
${({ disabled }) => disabled === true &&
|
|
@@ -2188,11 +2188,11 @@ const AvatarWrapper = styled__default["default"].div `
|
|
|
2188
2188
|
|
|
2189
2189
|
function Avatar({ size, src, alt, className, disabled, onClick, isActiveClick, id, style }) {
|
|
2190
2190
|
const [isImage, setIsImage] = React.useState(!!src);
|
|
2191
|
-
const defaultImg = 'https://cdn-images.frstfalconi.cloud/
|
|
2191
|
+
const defaultImg = 'https://cdn-images.frstfalconi.cloud/path582.svg';
|
|
2192
2192
|
React.useEffect(() => {
|
|
2193
2193
|
setIsImage(!!src);
|
|
2194
2194
|
}, [src]);
|
|
2195
|
-
return (jsxRuntime.jsx(styled.ThemeProvider, { theme: FRSTTheme, children: jsxRuntime.jsx(AvatarWrapper, { size: size, className: className, onClick: onClick, isActiveClick: isActiveClick, id: id, style: style, children:
|
|
2195
|
+
return (jsxRuntime.jsx(styled.ThemeProvider, { theme: FRSTTheme, children: jsxRuntime.jsx(AvatarWrapper, { size: size, className: className, onClick: onClick, isActiveClick: isActiveClick, id: id, style: style, children: isImage ? (jsxRuntime.jsx(AvatarImg$1, { src: src, size: size, disabled: disabled, onError: () => setIsImage(false) })) : (jsxRuntime.jsx(AvatarImg$1, { src: defaultImg, size: size, disabled: disabled })) }) }));
|
|
2196
2196
|
}
|
|
2197
2197
|
|
|
2198
2198
|
///-----------------------------------------
|