UNPKG

@coveord/plasma-mantine

Version:

A Plasma flavoured Mantine theme

35 lines (34 loc) 1.26 kB
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { factory, Modal as MantineModal } from '@mantine/core'; import { Header } from '../Header/Header.js'; import { ModalFooter as PlasmaModalFooter } from './ModalFooter.js'; const PlasmaModal = factory(({ title, description, help, ...otherProps }, ref)=>{ const header = typeof title === 'string' ? /*#__PURE__*/ _jsxs(Header, { titleComponent: "div", variant: "secondary", description: description, children: [ title, help && /*#__PURE__*/ _jsx(Header.DocAnchor, { ...help }) ] }) : title; return /*#__PURE__*/ _jsx(MantineModal, { ref: ref, title: header, ...otherProps }); }); PlasmaModal.displayName = 'Modal'; PlasmaModal.Root = MantineModal.Root; PlasmaModal.Body = MantineModal.Body; PlasmaModal.Overlay = MantineModal.Overlay; PlasmaModal.Content = MantineModal.Content; PlasmaModal.Header = MantineModal.Header; PlasmaModal.Title = MantineModal.Title; PlasmaModal.CloseButton = MantineModal.CloseButton; PlasmaModal.Stack = MantineModal.Stack; PlasmaModal.Footer = PlasmaModalFooter; export const Modal = PlasmaModal; //# sourceMappingURL=Modal.js.map