UNPKG

@coveord/plasma-mantine

Version:

A Plasma flavoured Mantine theme

80 lines (79 loc) 3.4 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "BrowserPreview", { enumerable: true, get: function() { return BrowserPreview; } }); var _interop_require_default = require("@swc/helpers/_/_interop_require_default"); var _object_spread = require("@swc/helpers/_/_object_spread"); var _object_spread_props = require("@swc/helpers/_/_object_spread_props"); var _object_without_properties = require("@swc/helpers/_/_object_without_properties"); var _jsxruntime = require("react/jsx-runtime"); var _core = require("@mantine/core"); var _clsx = /*#__PURE__*/ _interop_require_default._(require("clsx")); var _InfoToken = require("../InfoToken/InfoToken.js"); var _BrowserPreviewmodulecss = /*#__PURE__*/ _interop_require_default._(require("./BrowserPreview.module.css")); var BrowserPreview = function BrowserPreview(_0) { var children = _0.children, headerTooltip = _0.headerTooltip, title = _0.title, className = _0.className, others = _object_without_properties._(_0, [ "children", "headerTooltip", "title", "className" ]); return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_core.Stack, _object_spread_props._(_object_spread._({ className: (0, _clsx.default)(_BrowserPreviewmodulecss.default.root, className), gap: 0, maw: 544, mih: 0 }, others), { children: [ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_core.Group, { className: _BrowserPreviewmodulecss.default.header, justify: "space-between", p: "sm", bg: "var(--mantine-color-default-hover)", wrap: "nowrap", children: [ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_core.Group, { gap: "xs", wrap: "nowrap", children: [ /*#__PURE__*/ (0, _jsxruntime.jsx)(_core.Text, { c: "dimmed", fz: "md", lh: "18px", children: "Preview" }), !!headerTooltip && /*#__PURE__*/ (0, _jsxruntime.jsx)(_core.Tooltip, { label: headerTooltip, position: "right", maw: 400, children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_InfoToken.InfoToken.Information, { className: _BrowserPreviewmodulecss.default.infoIcon }) }) ] }), title && /*#__PURE__*/ (0, _jsxruntime.jsx)(_core.Text, { lineClamp: 1, c: "dimmed", fz: "md", lh: "18px", children: title }) ] }), /*#__PURE__*/ (0, _jsxruntime.jsx)(_core.Flex, { className: _BrowserPreviewmodulecss.default.content, p: "lg", direction: "column", children: children }) ] })); }; //# sourceMappingURL=BrowserPreview.js.map