@coveord/plasma-mantine
Version:
A Plasma flavoured Mantine theme
94 lines (93 loc) • 4.32 kB
JavaScript
;
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 _plasmareacticons = require("@coveord/plasma-react-icons");
var _core = require("@mantine/core");
var _clsx = /*#__PURE__*/ _interop_require_default._(require("clsx"));
var _BrowserPreviewmodulecss = /*#__PURE__*/ _interop_require_default._(require("./BrowserPreview.module.css"));
var BrowserPreview = function(_param) {
var children = _param.children, headerTooltip = _param.headerTooltip, title = _param.title, className = _param.className, others = _object_without_properties._(_param, [
"children",
"headerTooltip",
"title",
"className"
]);
var theme = (0, _core.useMantineTheme)();
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.jsx)(_core.Box, {
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_core.Group, {
className: _BrowserPreviewmodulecss.default.header,
justify: "space-between",
px: "sm",
py: "xs",
bg: "gray.1",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_core.Group, {
gap: "xs",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)(_core.Title, {
c: "gray.6",
order: 4,
children: "Preview"
}),
!!headerTooltip && /*#__PURE__*/ (0, _jsxruntime.jsx)(_core.Tooltip, {
label: headerTooltip,
position: "right",
maw: 400,
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_plasmareacticons.InfoSize16Px, {
height: 16,
className: _BrowserPreviewmodulecss.default.infoIcon
})
})
]
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)(_core.Text, {
lineClamp: 1,
color: "gray.6",
children: title
}),
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_core.Group, {
gap: "xs",
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)(_core.ColorSwatch, {
color: theme.colors.gray[3]
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)(_core.ColorSwatch, {
color: theme.colors.gray[3]
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)(_core.ColorSwatch, {
color: theme.colors.gray[3]
})
]
})
]
})
}),
/*#__PURE__*/ (0, _jsxruntime.jsx)(_core.Flex, {
className: _BrowserPreviewmodulecss.default.content,
p: "xl",
direction: "column",
children: children
})
]
}));
};
//# sourceMappingURL=BrowserPreview.js.map