@indielayer/ui
Version:
Indielayer UI Components with Tailwind CSS build for Vue 3
31 lines (30 loc) • 1.22 kB
JavaScript
import { defineComponent as c, computed as m, openBlock as p, createElementBlock as u, normalizeStyle as d, unref as l, normalizeClass as g, renderSlot as f } from "vue";
import { useTheme as b } from "../../composables/useTheme.js";
const o = {
verticalAlign: ["baseline", "bottom", "middle", "text-bottom", "text-top", "top"]
}, v = {
pointer: Boolean,
striped: Boolean,
selected: Boolean,
singleSelect: Boolean,
verticalAlign: {
type: String,
default: "top",
validator: (t) => o.verticalAlign.includes(t)
}
}, A = { name: "XTableRow", validators: o }, w = /* @__PURE__ */ c({
...A,
props: v,
setup(t) {
const e = t, n = m(() => e.verticalAlign === "baseline" ? "align-baseline" : e.verticalAlign === "bottom" ? "align-bottom" : e.verticalAlign === "middle" ? "align-middle" : e.verticalAlign === "text-bottom" ? "align-text-bottom" : e.verticalAlign === "text-top" ? "align-text-top" : e.verticalAlign === "top" ? "align-top" : ""), { styles: i, classes: a, className: r } = b("TableRow", {}, e);
return (s, x) => (p(), u("tr", {
style: d(l(i)),
class: g([l(r), l(a).row, n.value])
}, [
f(s.$slots, "default")
], 6));
}
});
export {
w as default
};