vue-cesium
Version:
Vue 3.x components for CesiumJS.
29 lines (26 loc) • 710 B
JavaScript
import { computed } from 'vue';
;
const alignMap = {
left: "start",
center: "center",
right: "end",
between: "between",
around: "around",
evenly: "evenly",
stretch: "stretch"
};
const alignValues = Object.keys(alignMap);
const useAlignProps = {
align: {
type: String,
validator: (v) => alignValues.includes(v)
}
};
function useAlign(props) {
return computed(() => {
const align = props.align === void 0 ? props.vertical === true ? "stretch" : "left" : props.align;
return `${props.vertical === true ? "items" : "justify"}-${alignMap[align]}`;
});
}
export { alignMap, alignValues, useAlign as default, useAlignProps };
//# sourceMappingURL=use-align.mjs.map