import { defineComponent, h } from "vue";
import { cx, iconNode } from "../utils.js";
export default defineComponent({
name: "GnIconButton",
props: {
icon: { type: String, required: true },
label: { type: String, required: true },
type: { type: String, default: "button" },
withoutHover: { type: Boolean, default: false }
},
setup(props, { attrs }) {
return () => h("button", {
...attrs,
type: props.type,
"aria-label": props.label,
class: cx("btn-icon", { "without-hover": props.withoutHover }, attrs.class)
}, [iconNode(props.icon)]);
}
});