UNPKG

@coveord/plasma-mantine

Version:

A Plasma flavoured Mantine theme

58 lines (57 loc) 2.33 kB
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { Flex, Group, Stack, Text, Tooltip } from '@mantine/core'; import cx from 'clsx'; import { InfoToken } from '../InfoToken/InfoToken.js'; import BrowserPreviewClasses from './BrowserPreview.module.css'; export const BrowserPreview = ({ children, headerTooltip, title, className, ...others })=>/*#__PURE__*/ _jsxs(Stack, { className: cx(BrowserPreviewClasses.root, className), gap: 0, maw: 544, mih: 0, ...others, children: [ /*#__PURE__*/ _jsxs(Group, { className: BrowserPreviewClasses.header, justify: "space-between", p: "sm", bg: "var(--mantine-color-default-hover)", wrap: "nowrap", children: [ /*#__PURE__*/ _jsxs(Group, { gap: "xs", wrap: "nowrap", children: [ /*#__PURE__*/ _jsx(Text, { c: "dimmed", fz: "md", lh: "18px", children: "Preview" }), !!headerTooltip && /*#__PURE__*/ _jsx(Tooltip, { label: headerTooltip, position: "right", maw: 400, children: /*#__PURE__*/ _jsx(InfoToken.Information, { className: BrowserPreviewClasses.infoIcon }) }) ] }), title && /*#__PURE__*/ _jsx(Text, { lineClamp: 1, c: "dimmed", fz: "md", lh: "18px", children: title }) ] }), /*#__PURE__*/ _jsx(Flex, { className: BrowserPreviewClasses.content, p: "lg", direction: "column", children: children }) ] }); //# sourceMappingURL=BrowserPreview.js.map