UNPKG

tdesign-mobile-vue

Version:
32 lines (28 loc) 910 B
/** * tdesign v1.7.0 * (c) 2024 TDesign Group * @license MIT */ import { i as isFunction_1 } from '../_chunks/dep-91d696ea.mjs'; import { getCurrentInstance, h } from 'vue'; import '../_chunks/dep-8bf3054e.mjs'; import '../_chunks/dep-3d249f65.mjs'; import '../_chunks/dep-620d73f7.mjs'; import '../_chunks/dep-e6c129ab.mjs'; function useIcon() { var instance = getCurrentInstance(); return function renderIconTNode(iconType, defaultIcons) { var iconContent; if (isFunction_1(instance.props[iconType])) { iconContent = instance.props[iconType](h); } else if (instance.slots[iconType]) { iconContent = instance.slots[iconType] && instance.slots[iconType](null)[0]; } else if (defaultIcons) { var Component = defaultIcons[instance.props.theme]; iconContent = Component; } return iconContent; }; } export { useIcon }; //# sourceMappingURL=icon.mjs.map