@synergy-design-system/vue
Version:
Vue3 wrappers for the Synergy Design System
43 lines (42 loc) • 1.23 kB
JavaScript
import { defineComponent, ref, computed, createElementBlock, openBlock, mergeProps } from "vue";
import "@synergy-design-system/components/components/icon-button/icon-button.js";
const _sfc_main = /* @__PURE__ */ defineComponent({
__name: "SynVueIconButton",
props: {
name: {},
library: {},
src: {},
href: {},
target: {},
download: {},
label: {},
size: {},
color: {},
disabled: {}
},
emits: ["syn-blur", "syn-focus"],
setup(__props, { expose: __expose }) {
const nativeElement = ref();
__expose({
nativeElement
});
const props = __props;
const visibleProps = computed(
() => Object.fromEntries(
Object.entries(props).filter(([, value]) => typeof value !== "undefined")
)
);
return (_ctx, _cache) => {
return openBlock(), createElementBlock("syn-icon-button", mergeProps({
onSynBlur: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("syn-blur", $event)),
onSynFocus: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("syn-focus", $event))
}, visibleProps.value, {
ref_key: "nativeElement",
ref: nativeElement
}), null, 16);
};
}
});
export {
_sfc_main as default
};