revdev-components 0.130.0 → 0.133.0
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/build/icon/social/names.d.ts +1 -1
- package/build/index.js +2 -22
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const SocialIconNameList: ("facebook" | "google" | "instagram" | "telegram" | "viber" | "whatsapp" | "youtube")[];
|
|
2
2
|
export type SocialIconName = (typeof SocialIconNameList)[number];
|
|
3
|
-
export declare const isSocialIconName: (name
|
|
3
|
+
export declare const isSocialIconName: (name?: string) => name is "facebook" | "google" | "instagram" | "telegram" | "viber" | "whatsapp" | "youtube";
|
package/build/index.js
CHANGED
|
@@ -2021,34 +2021,14 @@ var SocialIcon = function (props) {
|
|
|
2021
2021
|
var IconBoxContent = function (_a) {
|
|
2022
2022
|
var _b;
|
|
2023
2023
|
var flexRoot = _a.flexRoot, icon = _a.icon, rightIcon = _a.rightIcon, children = _a.children, className = _a.className, contentClassName = _a.contentClassName, onClick = _a.onClick, _c = _a.direction, direction = _c === void 0 ? "row" : _c, elementRev = _a.elementRev, style = _a.style;
|
|
2024
|
-
var iconComponent = React.useMemo(function () {
|
|
2025
|
-
if (!icon)
|
|
2026
|
-
return null;
|
|
2027
|
-
if (isSocialIconName(icon)) {
|
|
2028
|
-
return React.createElement(SocialIcon, { className: s$x.icon, name: icon });
|
|
2029
|
-
}
|
|
2030
|
-
else {
|
|
2031
|
-
return React.createElement(RegularIcon, { className: s$x.icon, name: icon });
|
|
2032
|
-
}
|
|
2033
|
-
}, [icon]);
|
|
2034
|
-
var rightIconComponent = React.useMemo(function () {
|
|
2035
|
-
if (!rightIcon)
|
|
2036
|
-
return null;
|
|
2037
|
-
if (isSocialIconName(rightIcon)) {
|
|
2038
|
-
return React.createElement(SocialIcon, { className: s$x.icon, name: rightIcon });
|
|
2039
|
-
}
|
|
2040
|
-
else {
|
|
2041
|
-
return React.createElement(RegularIcon, { className: s$x.icon, name: rightIcon });
|
|
2042
|
-
}
|
|
2043
|
-
}, [rightIcon]);
|
|
2044
2024
|
return (React.createElement("div", { ref: elementRev, style: style, className: classNames(s$x.root, (_b = {},
|
|
2045
2025
|
_b[s$x.flex] = flexRoot,
|
|
2046
2026
|
_b[s$x.button] = !!onClick,
|
|
2047
2027
|
_b[s$x.column] = direction === "column",
|
|
2048
2028
|
_b), className), onClick: onClick },
|
|
2049
|
-
|
|
2029
|
+
isSocialIconName(icon) ? React.createElement(SocialIcon, { className: s$x.icon, name: icon }) : React.createElement(RegularIcon, { className: s$x.icon, name: icon }),
|
|
2050
2030
|
children ? React.createElement("div", { className: classNames(contentClassName, s$x.root__children) }, children) : null,
|
|
2051
|
-
|
|
2031
|
+
isSocialIconName(rightIcon) ? (React.createElement(SocialIcon, { className: s$x.icon, name: rightIcon })) : (React.createElement(RegularIcon, { className: s$x.icon, name: rightIcon }))));
|
|
2052
2032
|
};
|
|
2053
2033
|
var IconDivision = function (props) {
|
|
2054
2034
|
var tooltip = props.tooltip, tooltipPlacement = props.tooltipPlacement, tooltipMouseEnterDelay = props.tooltipMouseEnterDelay;
|