UNPKG

mongoku

Version:

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

36 lines (33 loc) 1.2 kB
import './async-DUoD1OpG.js'; import { c as attr_class, s as stringify, k as attr_style } from './root-otUAnOAR.js'; function Tooltip($$renderer, $$props) { $$renderer.component(($$renderer2) => { let { trigger, content, show = false, tooltipClass = "", onTooltipMouseEnter, onTooltipMouseLeave } = $$props; let tooltipPosition = { left: "", right: "", top: "" }; $$renderer2.push(`<div class="relative inline-block">`); trigger($$renderer2); $$renderer2.push(`<!----></div>`); if (show) { $$renderer2.push("<!--[0-->"); $$renderer2.push(`<div role="tooltip"${attr_class(`fixed bg-[var(--light-background)] border border-[var(--border-color)] rounded-2xl z-[1000] shadow-xl backdrop-blur-md ${stringify(tooltipClass)}`)}${attr_style("color: var(--text);", { left: tooltipPosition.left, right: tooltipPosition.right, top: tooltipPosition.top })}>`); content($$renderer2); $$renderer2.push(`<!----></div>`); } else { $$renderer2.push("<!--[-1-->"); } $$renderer2.push(`<!--]-->`); }); } export { Tooltip as T }; //# sourceMappingURL=Tooltip-OVylvwfb.js.map