@indielayer/ui
Version:
Indielayer UI Components with Tailwind CSS build for Vue 3
42 lines (41 loc) • 1.21 kB
JavaScript
import { defineComponent as d, computed as c, openBlock as m, createElementBlock as u, normalizeStyle as p, unref as n, normalizeClass as f, renderSlot as h } from "vue";
import { useTheme as g } from "../../composables/useTheme.js";
const o = {
textAlign: [null, "left", "center", "right", "justify"],
verticalAlign: [null, "baseline", "bottom", "middle", "text-bottom", "text-top", "top"]
}, v = {
textAlign: {
type: String,
validator: (e) => o.textAlign.includes(e)
},
truncate: Boolean,
dense: Boolean,
width: [String, Number],
verticalAlign: {
type: String,
default: "middle",
validator: (e) => o.verticalAlign.includes(e)
}
}, b = {
name: "XTableCell",
validators: o
}, w = /* @__PURE__ */ d({
...b,
props: v,
setup(e) {
const t = e, l = c(() => typeof t.width == "number" ? `${t.width}px` : t.width), { styles: a, classes: i, className: r } = g("TableCell", {}, t);
return (s, x) => (m(), u("td", {
style: p([n(a), { width: l.value, minWidth: l.value, maxWidth: l.value }]),
class: f([
"relative",
n(r),
n(i).wrapper
])
}, [
h(s.$slots, "default")
], 6));
}
});
export {
w as default
};