UNPKG

mongoku

Version:

[![CI](https://github.com/huggingface/Mongoku/actions/workflows/ci.yml/badge.svg)](https://github.com/huggingface/Mongoku/actions/workflows/ci.yml)

51 lines (48 loc) 1.82 kB
import './async-DUoD1OpG.js'; import { c as attr_class, e as escape_html, j as bind_props, s as stringify } from './root-otUAnOAR.js'; function Panel($$renderer, $$props) { $$renderer.component(($$renderer2) => { let { children, title, titleClass, actions, class: className, ref = void 0 } = $$props; $$renderer2.push(`<div${attr_class(`rounded-2xl border border-[var(--border-color)] bg-[var(--light-background)]/70 shadow-sm ${stringify(className)}`)}>`); if (title || actions) { $$renderer2.push("<!--[0-->"); $$renderer2.push(`<div${attr_class(`px-3 sm:px-4 py-2 flex justify-between items-center ${stringify(children ? "border-b border-[var(--border-color)]" : "")}`)}><div${attr_class(`text-sm font-medium ${stringify(titleClass)}`)} style="color: var(--text);">`); if (typeof title === "string") { $$renderer2.push("<!--[0-->"); $$renderer2.push(`<span>${escape_html(title)}</span>`); } else if (title) { $$renderer2.push("<!--[1-->"); title($$renderer2); $$renderer2.push(`<!---->`); } else { $$renderer2.push("<!--[-1-->"); $$renderer2.push(` `); } $$renderer2.push(`<!--]--></div> `); if (actions) { $$renderer2.push("<!--[0-->"); $$renderer2.push(`<div class="flex gap-2 items-center">`); actions($$renderer2); $$renderer2.push(`<!----></div>`); } else { $$renderer2.push("<!--[-1-->"); } $$renderer2.push(`<!--]--></div>`); } else { $$renderer2.push("<!--[-1-->"); } $$renderer2.push(`<!--]--> `); children?.($$renderer2); $$renderer2.push(`<!----></div>`); bind_props($$props, { ref }); }); } export { Panel as P }; //# sourceMappingURL=Panel-C6VWd6JD.js.map