holakit
Version:
Yet another design-driven UI component set.
2 lines • 738 B
Plain Text
/*! Built with http://stenciljs.com */
const{h:t}=window.HolakitCore;class e{constructor(){this.href="#",this.type="button"}onClick(t){const e=this.el.closest("form");if(e){t.preventDefault();const n=document.createElement("button");n.type=this.type,n.style.display="none",e.appendChild(n),n.click(),n.remove()}}render(){return this.href&&t("a",{href:this.href,class:"button"},t("slot",null)),t("button",{onClick:this.onClick,class:"button"},t("slot",null))}static get is(){return"hola-button"}static get encapsulation(){return"shadow"}static get properties(){return{el:{elementRef:!0},href:{type:String,attr:"href"},type:{type:String,attr:"type"}}}static get style(){return"/**style-placeholder:hola-button:**/"}}export{e as HolaButton};