UNPKG

@coveord/plasma-mantine

Version:

A Plasma flavoured Mantine theme

54 lines (53 loc) 2.05 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "Modal", { enumerable: true, get: function() { return Modal; } }); var _object_spread = require("@swc/helpers/_/_object_spread"); var _object_without_properties = require("@swc/helpers/_/_object_without_properties"); var _sliced_to_array = require("@swc/helpers/_/_sliced_to_array"); var _to_array = require("@swc/helpers/_/_to_array"); var _jsxruntime = require("react/jsx-runtime"); var _core = require("@mantine/core"); var _Header = require("../Header/Header.js"); var _ModalFooter = require("./ModalFooter.js"); var PlasmaModal = (0, _core.factory)(function(_0, _1) { var _ref = [ _0, _1 ], _ref1 = _to_array._(_ref), _ref2 = _ref1[0], _rest = _ref1.slice(1), title = _ref2.title, description = _ref2.description, help = _ref2.help, otherProps = _object_without_properties._(_ref2, [ "title", "description", "help" ]), _rest1 = _sliced_to_array._(_rest, 1), ref = _rest1[0]; var header = typeof title === 'string' ? /*#__PURE__*/ (0, _jsxruntime.jsxs)(_Header.Header, { titleComponent: "div", variant: "secondary", description: description, children: [ title, help && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Header.Header.DocAnchor, _object_spread._({}, help)) ] }) : title; return /*#__PURE__*/ (0, _jsxruntime.jsx)(_core.Modal, _object_spread._({ ref: ref, title: header }, otherProps)); }); PlasmaModal.displayName = 'Modal'; PlasmaModal.Root = _core.Modal.Root; PlasmaModal.Body = _core.Modal.Body; PlasmaModal.Overlay = _core.Modal.Overlay; PlasmaModal.Content = _core.Modal.Content; PlasmaModal.Header = _core.Modal.Header; PlasmaModal.Title = _core.Modal.Title; PlasmaModal.CloseButton = _core.Modal.CloseButton; PlasmaModal.Stack = _core.Modal.Stack; PlasmaModal.Footer = _ModalFooter.ModalFooter; var Modal = PlasmaModal; //# sourceMappingURL=Modal.js.map