@scalar/api-client
Version:
the open source API testing client
39 lines (38 loc) • 1.21 kB
JavaScript
import { defineComponent as r, createElementBlock as o, openBlock as l, normalizeProps as n, guardReactiveProps as i, unref as m, createElementVNode as p, normalizeStyle as c, normalizeClass as u, createCommentVNode as d, renderSlot as t } from "vue";
import { useBindCx as f } from "@scalar/components";
const b = ["role"], y = {
key: 0,
class: "sr-only"
}, _ = /* @__PURE__ */ r({
__name: "DataTable",
props: {
columns: {},
scroll: { type: Boolean },
presentational: { type: Boolean }
},
setup(v) {
const { cx: a } = f();
return (e, w) => (l(), o("div", n(i(
m(a)(
e.scroll ? "overflow-x-auto custom-scroll" : "overflow-visible",
"scalar-data-table"
)
)), [
p("table", {
class: u(["mb-0 grid min-h-8 auto-rows-auto", { "w-max min-w-full": e.scroll }]),
role: e.presentational ? "presentation" : "table",
style: c({
gridTemplateColumns: e.columns.map((s) => s || "1fr").join(" ")
})
}, [
e.$slots.caption ? (l(), o("caption", y, [
t(e.$slots, "caption")
])) : d("", !0),
t(e.$slots, "default")
], 14, b)
], 16));
}
});
export {
_ as default
};