UNPKG

@kwiz/fluentui

Version:
22 lines 1.38 kB
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { Drawer, DrawerBody, DrawerHeader, DrawerHeaderTitle, makeStyles, mergeClasses } from "@fluentui/react-components"; import React from "react"; import { useCommonStyles } from "../styles/styles"; const useStyles = makeStyles({ drawer: { border: 0, }, heading: { //when using KWIZOverflowV2 in title overflow: "hidden", flexGrow: 1 } }); export const DrawerEX = React.forwardRef((props, ref) => { var _a, _b; const commonStyles = useCommonStyles(); const css = useStyles(); const rootProps = Object.assign(Object.assign({}, props), { title: "" }); return _jsxs(Drawer, Object.assign({ ref: ref }, rootProps, { className: mergeClasses(rootProps.className, css.drawer), children: [_jsx(DrawerHeader, Object.assign({}, props.headerProps, { className: commonStyles.header, children: _jsx(DrawerHeaderTitle, Object.assign({ heading: { className: css.heading } }, props.headerTitleProps, { action: props.titleActions || ((_a = props.headerTitleProps) === null || _a === void 0 ? void 0 : _a.action), children: props.title || ((_b = props.headerTitleProps) === null || _b === void 0 ? void 0 : _b.children) })) })), _jsx(DrawerBody, Object.assign({}, props.bodyProps, { children: props.children }))] })); }); //# sourceMappingURL=drawer-ex.js.map