UNPKG

@opensig/opendesign

Version:

32 lines (31 loc) 1.01 kB
"use strict"; const vue = require("vue"); const icons = require("../_utils/icons.js"); const types = require("./types.js"); const _hoisted_1 = ["tabindex"]; const _sfc_main = /* @__PURE__ */ vue.defineComponent({ __name: "OIcon", props: types.iconProps, setup(__props) { const props = __props; return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock("div", { class: vue.normalizeClass(["o-icon", [ { "o-icon-btn": props.button, "o-icon-btn-disabled": props.disabled } ]]), tabindex: props.button ? 0 : "" }, [ vue.renderSlot(_ctx.$slots, "default", {}, () => [ props.loading ? (vue.openBlock(), vue.createBlock(vue.unref(icons.IconLoading), { key: 0, class: "o-rotating" })) : (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(props.icon), { key: 1 })) ]) ], 10, _hoisted_1); }; } }); module.exports = _sfc_main;