zhangyong
2023-08-22 1353e87cb21a4032d585d7404bae9042f2ebcf08
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { inject, computed, unref } from 'vue';
import '../../utils/index.mjs';
import '../../constants/index.mjs';
import { buildProp } from '../../utils/vue/props/runtime.mjs';
import { componentSizes } from '../../constants/size.mjs';
 
const useSizeProp = buildProp({
  type: String,
  values: componentSizes,
  required: false
});
const useSizeProps = {
  size: useSizeProp
};
const SIZE_INJECTION_KEY = Symbol("size");
const useGlobalSize = () => {
  const injectedSize = inject(SIZE_INJECTION_KEY, {});
  return computed(() => {
    return unref(injectedSize.size) || "";
  });
};
 
export { SIZE_INJECTION_KEY, useGlobalSize, useSizeProp, useSizeProps };
//# sourceMappingURL=index.mjs.map