frst-components 0.22.66 → 0.22.68
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
CHANGED
|
@@ -2143,11 +2143,27 @@ const AvatarImg$1 = styled__default["default"].img `
|
|
|
2143
2143
|
height: ${(props) => props.size || '120px'};
|
|
2144
2144
|
border-radius: 50%;
|
|
2145
2145
|
object-fit: cover;
|
|
2146
|
+
background-image: url('https://cdn-images.frstfalconi.cloud/Avatar_default.png');
|
|
2147
|
+
background-size: cover;
|
|
2148
|
+
background-position: center;
|
|
2149
|
+
display: flex;
|
|
2150
|
+
align-items: center;
|
|
2151
|
+
justify-content: center;
|
|
2146
2152
|
|
|
2147
2153
|
${({ disabled }) => disabled === true &&
|
|
2148
2154
|
`
|
|
2149
2155
|
filter: grayscale(100%);
|
|
2150
2156
|
`}
|
|
2157
|
+
|
|
2158
|
+
&::after {
|
|
2159
|
+
content: "";
|
|
2160
|
+
width: 100%;
|
|
2161
|
+
height: 100%;
|
|
2162
|
+
background-repeat: no-repeat;
|
|
2163
|
+
background-size: cover;
|
|
2164
|
+
background-position: center;
|
|
2165
|
+
background-image: ${(props) => props.src ? `url(${props.src})` : 'none'};
|
|
2166
|
+
}
|
|
2151
2167
|
`;
|
|
2152
2168
|
const AvatarWrapper = styled__default["default"].div `
|
|
2153
2169
|
width: ${(props) => props.size || '120px'};
|
|
@@ -2161,7 +2177,7 @@ function Avatar({ size, src, alt, className, disabled, onClick, isActiveClick, i
|
|
|
2161
2177
|
React.useEffect(() => {
|
|
2162
2178
|
setIsImage(!!src);
|
|
2163
2179
|
}, [src]);
|
|
2164
|
-
return (jsxRuntime.jsx(styled.ThemeProvider, { theme: FRSTTheme, children: jsxRuntime.jsx(AvatarWrapper, { size: size, className: className, onClick: onClick, isActiveClick: isActiveClick, id: id, style: style, children: jsxRuntime.jsx(AvatarImg$1, { src: isImage ? src : defaultImg,
|
|
2180
|
+
return (jsxRuntime.jsx(styled.ThemeProvider, { theme: FRSTTheme, children: jsxRuntime.jsx(AvatarWrapper, { size: size, className: className, onClick: onClick, isActiveClick: isActiveClick, id: id, style: style, children: jsxRuntime.jsx(AvatarImg$1, { src: isImage ? src : defaultImg, size: size, disabled: disabled }) }) }));
|
|
2165
2181
|
}
|
|
2166
2182
|
|
|
2167
2183
|
///-----------------------------------------
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatarStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/avatar/avatarStyles.ts"],"names":[],"mappings":"AAEA,UAAU,OAAO;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,GAAG,CAAA;IACT,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"avatarStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/avatar/avatarStyles.ts"],"names":[],"mappings":"AAEA,UAAU,OAAO;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,GAAG,CAAA;IACT,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED,eAAO,MAAM,SAAS,yEA4BrB,CAAA;AAED,eAAO,MAAM,aAAa,yEAIzB,CAAA"}
|