| 1 |
"use strict"; |
| 2 |
Object.defineProperty(exports, "__esModule", { value: true }); |
| 3 |
exports.DrawerContent = exports.DrawerContentColorVariant = void 0; |
| 4 |
const tslib_1 = require("tslib"); |
| 5 |
const jsx_runtime_1 = require("react/jsx-runtime"); |
| 6 |
const react_1 = require("react"); |
| 7 |
const drawer_1 = tslib_1.__importDefault(require("@patternfly/react-styles/css/components/Drawer/drawer")); |
| 8 |
const react_styles_1 = require("@patternfly/react-styles"); |
| 9 |
const DrawerMain_1 = require("./DrawerMain"); |
| 10 |
const Drawer_1 = require("./Drawer"); |
| 11 |
var DrawerContentColorVariant; |
| 12 |
(function (DrawerContentColorVariant) { |
| 13 |
DrawerContentColorVariant["default"] = "default"; |
| 14 |
DrawerContentColorVariant["primary"] = "primary"; |
| 15 |
DrawerContentColorVariant["secondary"] = "secondary"; |
| 16 |
})(DrawerContentColorVariant || (exports.DrawerContentColorVariant = DrawerContentColorVariant = {})); |
| 17 |
const DrawerContent = (_a) => { |
| 18 |
var { className, children, panelContent, colorVariant = DrawerContentColorVariant.default } = _a, props = tslib_1.__rest(_a, ["className", "children", "panelContent", "colorVariant"]); |
| 19 |
const { drawerContentRef } = (0, react_1.useContext)(Drawer_1.DrawerContext); |
| 20 |
return ((0, jsx_runtime_1.jsxs)(DrawerMain_1.DrawerMain, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: (0, react_styles_1.css)(drawer_1.default.drawerContent, colorVariant === DrawerContentColorVariant.primary && drawer_1.default.modifiers.primary, colorVariant === DrawerContentColorVariant.secondary && drawer_1.default.modifiers.secondary, className), ref: drawerContentRef }, props, { children: children })), panelContent] })); |
| 21 |
}; |
| 22 |
exports.DrawerContent = DrawerContent; |
| 23 |
exports.DrawerContent.displayName = 'DrawerContent'; |
| 24 |
//# sourceMappingURL=DrawerContent.js.map |