@indielayer/ui
Version:
Indielayer UI Components with Tailwind CSS build for Vue 3
44 lines (43 loc) • 1.3 kB
JavaScript
import { defineComponent as r, openBlock as a, createBlock as l, withCtx as e, createElementVNode as s, createVNode as i, renderSlot as o, createTextVNode as n, toDisplayString as p } from "vue";
import c from "../popover/Popover.vue.js";
import "../popover/Popover.vue3.js";
import m from "../popover/PopoverContainer.vue.js";
import "../../node_modules/.pnpm/floating-vue@5.2.2_@nuxt_kit@3.10.1_rollup@3.29.4__vue@3.5.10_typescript@5.2.2_/node_modules/floating-vue/dist/floating-vue.js";
const d = { class: "dark" }, f = {
tooltip: String,
placement: {
type: String,
default: "bottom"
}
}, _ = { name: "XTooltip" }, $ = /* @__PURE__ */ r({
..._,
props: f,
setup(u) {
return (t, h) => (a(), l(c, {
triggers: ["hover", "click"],
class: "inline-block",
"hide-arrow": !1,
placement: t.placement
}, {
content: e(() => [
s("div", d, [
i(m, { class: "p-2 text-white text-xs w-max max-w-xs" }, {
default: e(() => [
o(t.$slots, "tooltip", {}, () => [
n(p(t.tooltip), 1)
])
]),
_: 3
})
])
]),
default: e(() => [
o(t.$slots, "default")
]),
_: 3
}, 8, ["placement"]));
}
});
export {
$ as default
};