frst-components 0.22.96 → 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.
Files changed (2) hide show
  1. package/dist/index.js +3 -4
  2. 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/path582.svg');
2175
+ background-image: url('https://cdn-images.frstfalconi.cloud/path582.svg');
2176
2176
  background-size: cover;
2177
2177
 
2178
2178
  ${({ disabled }) => disabled === true &&
@@ -2187,13 +2187,12 @@ const AvatarWrapper = styled__default["default"].div `
2187
2187
  `;
2188
2188
 
2189
2189
  function Avatar({ size, src, alt, className, disabled, onClick, isActiveClick, id, style }) {
2190
- const [isImage, setIsImage] = React.useState(!!src); // Assume que a imagem está presente inicialmente
2190
+ const [isImage, setIsImage] = React.useState(!!src);
2191
2191
  const defaultImg = 'https://cdn-images.frstfalconi.cloud/path582.svg';
2192
2192
  React.useEffect(() => {
2193
2193
  setIsImage(!!src);
2194
2194
  }, [src]);
2195
- return (jsxRuntime.jsxs(styled.ThemeProvider, { theme: FRSTTheme, children: [" ", jsxRuntime.jsx(AvatarWrapper, { size: size, className: className, onClick: onClick, isActiveClick: isActiveClick, id: id, style: style, children: isImage ? ( // Renderize a imagem apenas se houver uma URL válida
2196
- jsxRuntime.jsx(AvatarImg$1, { src: src, size: size, disabled: disabled, onError: () => setIsImage(false) })) : (jsxRuntime.jsx(AvatarImg$1, { src: defaultImg, size: size, disabled: disabled })) })] }));
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 })) }) }));
2197
2196
  }
2198
2197
 
2199
2198
  ///-----------------------------------------
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "frst-components",
3
3
  "homepage": "http://FRST-Falconi.github.io/storybook.frstfalconi.com",
4
- "version": "0.22.96",
4
+ "version": "0.22.98",
5
5
  "private": false,
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",