UNPKG

tass-ui

Version:

A high quality UI Toolkit built on Vue.js3+.

52 lines (51 loc) 1.11 kB
import "../../../theme-chalk/src/col.scss.mjs"; import "../../../theme-chalk/src/row.scss.mjs"; import { defineComponent, provide, computed, h } from "vue"; const row = defineComponent({ name: "TassRow", props: { tag: { type: String, default: "div" }, gutter: { type: Number, default: 0 }, justify: { type: String, default: "start" } }, setup(props, ctx) { provide("TassRow", props.gutter); const Class = computed(() => [ "tas-row", props.justify !== "start" ? `is-justify-${props.justify}` : "" ]); const styles = computed(() => { const res = { marginLeft: "", marginRight: "" }; if (props.gutter) { res.marginLeft = res.marginRight = `-${props.gutter / 2}px`; } return res; }); return () => { var _a, _b; return h( props.tag, { class: Class.value, style: styles.value }, (_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a) ); }; } }); export { row as default };