UNPKG

@mantine/core

Version:

React components library focused on usability, accessibility and developer experience

41 lines (40 loc) 1.43 kB
"use client"; import { useProps } from "../../core/MantineProvider/use-props/use-props.mjs"; import { factory } from "../../core/factory/factory.mjs"; import { ModalBaseContent } from "../ModalBase/ModalBaseContent.mjs"; import { NativeScrollArea } from "../ModalBase/NativeScrollArea.mjs"; import { useDrawerContext } from "./Drawer.context.mjs"; import Drawer_module_default from "./Drawer.module.mjs"; import { jsx } from "react/jsx-runtime"; //#region packages/@mantine/core/src/components/Drawer/DrawerContent.tsx const DrawerContent = factory((_props) => { const { classNames, className, style, styles, vars, children, radius, __hidden, ...others } = useProps("DrawerContent", null, _props); const ctx = useDrawerContext(); const Scroll = ctx.scrollAreaComponent || NativeScrollArea; return /* @__PURE__ */ jsx(ModalBaseContent, { ...ctx.getStyles("content", { className, style, styles, classNames }), innerProps: ctx.getStyles("inner", { className, style, styles, classNames }), ...others, radius: radius || ctx.radius || 0, "data-hidden": __hidden || void 0, children: /* @__PURE__ */ jsx(Scroll, { style: { height: "calc(100vh - var(--drawer-offset) * 2)" }, children }) }); }); DrawerContent.classes = Drawer_module_default; DrawerContent.displayName = "@mantine/core/DrawerContent"; //#endregion export { DrawerContent }; //# sourceMappingURL=DrawerContent.mjs.map