@playbooks/ui
Version:
An interface library for Playbooks.
66 lines (65 loc) • 2.46 kB
JavaScript
;
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require$$0 = require("react/jsx-runtime");
const html = require("./toast-context-kVz4KXNu.cjs");
const Banner = ({ name = "Banner", tailwind, className, children, ...props }) => {
const { theme } = html.useInterface();
const base = theme.banner();
const computed = { ...base, ...props, tailwind, className, name };
return /* @__PURE__ */ require$$0.jsx(html.Div, { ...computed, children });
};
const BannerIcon = ({
name = "BannerIcon",
icon = "exclamation-circle",
tailwind,
className,
...props
}) => {
const { theme } = html.useInterface();
const base = theme.bannerIcon();
const computed = { ...base, ...props, tailwind, className, name };
return /* @__PURE__ */ require$$0.jsx(html.Div, { ...computed, children: /* @__PURE__ */ require$$0.jsx(html.Icon, { icon, ...tailwind == null ? void 0 : tailwind.icon }) });
};
const BannerBody = ({ name = "BannerBody", tailwind, className, children, ...props }) => {
const { theme } = html.useInterface();
const base = theme.bannerBody();
const computed = { ...base, ...props, tailwind, className, name };
return /* @__PURE__ */ require$$0.jsx(html.Div, { ...computed, children });
};
const BannerTitle = ({
name = "BannerTitle",
size = "h6",
tailwind,
className,
children,
...props
}) => {
const { theme } = html.useInterface();
const base = theme.bannerTitle();
const computed = { ...base, ...props, tailwind, className, name };
return /* @__PURE__ */ require$$0.jsx(html.Font, { size, ...computed, children });
};
const BannerText = ({ name = "BannerText", tailwind, className, children, ...props }) => {
const { theme } = html.useInterface();
const base = theme.bannerText();
const computed = { ...base, ...props, tailwind, className, name };
return /* @__PURE__ */ require$$0.jsx(html.P, { ...computed, children });
};
const BannerActions = ({
name = "BannerActions",
tailwind,
className,
children,
...props
}) => {
const { theme } = html.useInterface();
const base = theme.bannerActions();
const computed = { ...base, ...props, tailwind, className, name };
return /* @__PURE__ */ require$$0.jsx(html.Div, { ...computed, children });
};
exports.Banner = Banner;
exports.BannerActions = BannerActions;
exports.BannerBody = BannerBody;
exports.BannerIcon = BannerIcon;
exports.BannerText = BannerText;
exports.BannerTitle = BannerTitle;