@skbkontur/ui-kit
Version:
35 lines • 2.02 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var React = tslib_1.__importStar(require("react"));
var styled_components_1 = tslib_1.__importDefault(require("../../../lib/styled-components"));
var InternalMenuWrapper = /** @class */ (function (_super) {
tslib_1.__extends(InternalMenuWrapper, _super);
function InternalMenuWrapper() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.node = null;
_this.focus = function () {
if (_this.node && _this.node.focus) {
_this.node.focus();
}
};
return _this;
}
InternalMenuWrapper.prototype.render = function () {
var _this = this;
var _a = this.props, children = _a.children, hasShadow = _a.hasShadow, rest = tslib_1.__rest(_a, ["children", "hasShadow"]);
return (React.createElement("div", tslib_1.__assign({ ref: function (element) { return (_this.node = element); } }, rest), children));
};
return InternalMenuWrapper;
}(React.Component));
exports.InternalMenuWrapper = InternalMenuWrapper;
exports.InternalMenuStyledWrapper = styled_components_1.default(InternalMenuWrapper)(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n background: ", ";\n overflow: auto;\n padding: 5px 0;\n outline: none;\n\n ", ";\n"], ["\n background: ", ";\n overflow: auto;\n padding: 5px 0;\n outline: none;\n\n ",
";\n"])), function (_a) {
var theme = _a.theme;
return theme.internalMenu.background;
}, styled_components_1.isTruthyProp('hasShadow')(templateObject_2 || (templateObject_2 = tslib_1.__makeTemplateObject(["\n border: 1px solid #d5d5d5;\n box-shadow: ", ";\n "], ["\n border: 1px solid #d5d5d5;\n box-shadow: ", ";\n "])), function (_a) {
var theme = _a.theme;
return theme.internalMenu['box-shadow'];
}));
var templateObject_2, templateObject_1;
//# sourceMappingURL=InternalMenuView.js.map
;