Files
starface-outlook-sync-addin/node_modules/@fluentui/react/lib-amd/components/Overlay/Overlay.base.js
T
Stefan Hacker 37ad745546 first commit
2026-04-03 09:38:48 +02:00

35 lines
1.8 KiB
JavaScript

define(["require", "exports", "tslib", "react", "../../Utilities"], function (require, exports, tslib_1, React, Utilities_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.OverlayBase = void 0;
var getClassNames = (0, Utilities_1.classNamesFunction)();
var OverlayBase = /** @class */ (function (_super) {
tslib_1.__extends(OverlayBase, _super);
function OverlayBase(props) {
var _this = _super.call(this, props) || this;
(0, Utilities_1.initializeComponentRef)(_this);
var _a = _this.props.allowTouchBodyScroll, allowTouchBodyScroll = _a === void 0 ? false : _a;
_this._allowTouchBodyScroll = allowTouchBodyScroll;
return _this;
}
OverlayBase.prototype.componentDidMount = function () {
!this._allowTouchBodyScroll && (0, Utilities_1.disableBodyScroll)();
};
OverlayBase.prototype.componentWillUnmount = function () {
!this._allowTouchBodyScroll && (0, Utilities_1.enableBodyScroll)();
};
OverlayBase.prototype.render = function () {
var _a = this.props, isDark = _a.isDarkThemed, className = _a.className, theme = _a.theme, styles = _a.styles;
var divProps = (0, Utilities_1.getNativeProps)(this.props, Utilities_1.divProperties);
var classNames = getClassNames(styles, {
theme: theme,
className: className,
isDark: isDark,
});
return React.createElement("div", tslib_1.__assign({}, divProps, { className: classNames.root }));
};
return OverlayBase;
}(React.Component));
exports.OverlayBase = OverlayBase;
});
//# sourceMappingURL=Overlay.base.js.map