UNPKG

holakit

Version:

Yet another design-driven UI component set.

2 lines 1.06 kB
/*! Built with http://stenciljs.com */ import{h}from"../holakitcore.core.js";var HolaButton=function(){function e(){this.href="#",this.type="button"}return e.prototype.onClick=function(e){var t=this.el.closest("form");if(t){e.preventDefault();var n=document.createElement("button");n.type=this.type,n.style.display="none",t.appendChild(n),n.click(),n.remove()}},e.prototype.render=function(){return this.href&&h("a",{href:this.href,class:"button"},h("slot",null)),h("button",{onClick:this.onClick,class:"button"},h("slot",null))},Object.defineProperty(e,"is",{get:function(){return"hola-button"},enumerable:!0,configurable:!0}),Object.defineProperty(e,"encapsulation",{get:function(){return"shadow"},enumerable:!0,configurable:!0}),Object.defineProperty(e,"properties",{get:function(){return{el:{elementRef:!0},href:{type:String,attr:"href"},type:{type:String,attr:"type"}}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"style",{get:function(){return"/**style-placeholder:hola-button:**/"},enumerable:!0,configurable:!0}),e}();export{HolaButton};