| 1 |
import { __rest } from "tslib"; |
| 2 |
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; |
| 3 |
import { useContext } from 'react'; |
| 4 |
import styles from '@patternfly/react-styles/css/components/Drawer/drawer.mjs'; |
| 5 |
import { css } from '@patternfly/react-styles'; |
| 6 |
import { DrawerMain } from './DrawerMain'; |
| 7 |
import { DrawerContext } from './Drawer'; |
| 8 |
export var DrawerContentColorVariant; |
| 9 |
(function (DrawerContentColorVariant) { |
| 10 |
DrawerContentColorVariant["default"] = "default"; |
| 11 |
DrawerContentColorVariant["primary"] = "primary"; |
| 12 |
DrawerContentColorVariant["secondary"] = "secondary"; |
| 13 |
})(DrawerContentColorVariant || (DrawerContentColorVariant = {})); |
| 14 |
export const DrawerContent = (_a) => { |
| 15 |
var { className, children, panelContent, colorVariant = DrawerContentColorVariant.default } = _a, props = __rest(_a, ["className", "children", "panelContent", "colorVariant"]); |
| 16 |
const { drawerContentRef } = useContext(DrawerContext); |
| 17 |
return (_jsxs(DrawerMain, { children: [_jsx("div", Object.assign({ className: css(styles.drawerContent, colorVariant === DrawerContentColorVariant.primary && styles.modifiers.primary, colorVariant === DrawerContentColorVariant.secondary && styles.modifiers.secondary, className), ref: drawerContentRef }, props, { children: children })), panelContent] })); |
| 18 |
}; |
| 19 |
DrawerContent.displayName = 'DrawerContent'; |
| 20 |
//# sourceMappingURL=DrawerContent.js.map |