winbox-ui-next
Version:
We Design Vue 2.0: A Vue.js 3 UI Library
17 lines (16 loc) • 635 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports[Symbol.toStringTag] = "Module";
var vue = require("vue");
var context = require("../config-provider/context.js");
const useSize = (size, { defaultValue = "default" } = {}) => {
const configProviderCtx = vue.inject(context.configProviderInjectionKey, void 0);
const mergedSize = vue.computed(() => {
var _a, _b;
return (_b = (_a = size == null ? void 0 : size.value) != null ? _a : configProviderCtx == null ? void 0 : configProviderCtx.size) != null ? _b : defaultValue;
});
return {
mergedSize
};
};
exports.useSize = useSize;