magneto365.ui 2.71.0 → 2.72.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/dist/cjs/index.js +4 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/UI/molecules/Drawer/Drawer.interface.d.ts +4 -0
- package/dist/esm/index.js +4 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/UI/molecules/Drawer/Drawer.interface.d.ts +4 -0
- package/dist/index.d.ts +4 -0
- package/package.json +1 -1
|
@@ -42,6 +42,10 @@ export interface IDrawer {
|
|
|
42
42
|
* this property blocks fn onClose from background
|
|
43
43
|
*/
|
|
44
44
|
blockBackgroundClose?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* this property sets custom styles into background drawer
|
|
47
|
+
*/
|
|
48
|
+
backGroundClassName?: string;
|
|
45
49
|
}
|
|
46
50
|
/**
|
|
47
51
|
* This interface represents a Portal for the Drawer component.
|
package/dist/esm/index.js
CHANGED
|
@@ -3656,13 +3656,13 @@ var style$T = {"magneto-ui-drawer":"mg_drawer_magneto-ui-drawer_1hxen","magneto-
|
|
|
3656
3656
|
|
|
3657
3657
|
var DEFAULT_PADDING = 20;
|
|
3658
3658
|
var Component$22 = function (_a) {
|
|
3659
|
-
var _b = _a.className, className = _b === void 0 ? '' : _b, isOpen = _a.isOpen, _c = _a.direction, direction = _c === void 0 ? 'left' : _c, isFull = _a.isFull, customPadding = _a.customPadding, drawerWidth = _a.drawerWidth, isMobile = _a.isMobile, hideButton = _a.hideButton, children = _a.children, onClose = _a.onClose, _d = _a.blockBackgroundClose, blockBackgroundClose = _d === void 0 ? false : _d;
|
|
3659
|
+
var _b = _a.className, className = _b === void 0 ? '' : _b, isOpen = _a.isOpen, _c = _a.direction, direction = _c === void 0 ? 'left' : _c, isFull = _a.isFull, customPadding = _a.customPadding, drawerWidth = _a.drawerWidth, isMobile = _a.isMobile, hideButton = _a.hideButton, children = _a.children, onClose = _a.onClose, _d = _a.blockBackgroundClose, blockBackgroundClose = _d === void 0 ? false : _d, _e = _a.backGroundClassName, backGroundClassName = _e === void 0 ? '' : _e;
|
|
3660
3660
|
var fullDrawer = isFull ? "full-drawer" : '';
|
|
3661
3661
|
var paddingValue = customPadding !== undefined ? "".concat(customPadding, "px") : "".concat(DEFAULT_PADDING, "px");
|
|
3662
3662
|
var backgroundEffect = isMobile ? 'no-background' : 'background-drawer';
|
|
3663
3663
|
var widthValue = { '--drawer-width': drawerWidth };
|
|
3664
|
-
var
|
|
3665
|
-
var
|
|
3664
|
+
var _f = useState(false), showContent = _f[0], setShowContent = _f[1];
|
|
3665
|
+
var _g = useState(isOpen), renderPortal = _g[0], setRenderPortal = _g[1];
|
|
3666
3666
|
var showDrawer = showContent ? "show-".concat(direction) : "hidden-".concat(direction);
|
|
3667
3667
|
useEffect(function () {
|
|
3668
3668
|
var body = document.body;
|
|
@@ -3696,7 +3696,7 @@ var Component$22 = function (_a) {
|
|
|
3696
3696
|
!hideButton && (React.createElement("button", { className: style$T['magneto-ui-close-button'], onClick: onClose },
|
|
3697
3697
|
React.createElement(IconItem, { icon: Add, hover: false }))),
|
|
3698
3698
|
children),
|
|
3699
|
-
isOpen && (React.createElement("span", { className: "".concat(style$T[backgroundEffect]), onClick: blockBackgroundClose ? function () { return null; } : onClose })))))));
|
|
3699
|
+
isOpen && (React.createElement("span", { className: "".concat(style$T[backgroundEffect], " ").concat(backGroundClassName), onClick: blockBackgroundClose ? function () { return null; } : onClose })))))));
|
|
3700
3700
|
};
|
|
3701
3701
|
/**
|
|
3702
3702
|
* Molecule UI component for Drawer
|