@octopusdeploy/design-system-components
Version:
The design systems component library.
20 lines (19 loc) • 854 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.popoverWidthOptions = void 0;
exports.PopoverContentContainer = PopoverContentContainer;
const jsx_runtime_1 = require("react/jsx-runtime");
const css_1 = require("@emotion/css");
exports.popoverWidthOptions = ["narrow", "wide", "extra-wide"];
function PopoverContentContainer({ width, children, boundaryPadding = 24 }) {
return ((0, jsx_runtime_1.jsx)("div", { className: (0, css_1.cx)(popoverContentStyles, { [wideWidth]: width === "wide" }, { [extraWideWidth]: width === "extra-wide" }), style: { padding: `${boundaryPadding}px` }, children: children }));
}
const popoverContentStyles = (0, css_1.css)({
maxWidth: "20.5rem",
});
const wideWidth = (0, css_1.css)({
maxWidth: "25rem",
});
const extraWideWidth = (0, css_1.css)({
maxWidth: "780px",
});