tass-ui
Version:
A high quality UI Toolkit built on Vue.js3+.
52 lines (51 loc) • 1.22 kB
JavaScript
;
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
require("../../../theme-chalk/src/col.scss.js");
require("../../../theme-chalk/src/row.scss.js");
const vue = require("vue");
const row = vue.defineComponent({
name: "TassRow",
props: {
tag: {
type: String,
default: "div"
},
gutter: {
type: Number,
default: 0
},
justify: {
type: String,
default: "start"
}
},
setup(props, ctx) {
vue.provide("TassRow", props.gutter);
const Class = vue.computed(() => [
"tas-row",
props.justify !== "start" ? `is-justify-${props.justify}` : ""
]);
const styles = vue.computed(() => {
const res = {
marginLeft: "",
marginRight: ""
};
if (props.gutter) {
res.marginLeft = res.marginRight = `-${props.gutter / 2}px`;
}
return res;
});
return () => {
var _a, _b;
return vue.h(
props.tag,
{
class: Class.value,
style: styles.value
},
(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)
);
};
}
});
exports.default = row;