UNPKG

vue-burger-button

Version:

A Vue burger button as functional component, which is faster than a regular component, and is pretty small (JS min+gzip is lower than 700b and CSS min+gzip is lower than 400b).

8 lines (7 loc) 1.44 kB
/*! * vue-burger-button v0.1.2 * (c) 2018-present Vitor Luiz Cavalcanti <vitorluizc@outlook.com> (https://vitorluizc.github.io) * Released under the MIT License. */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.VueBurgerButton=e()}(this,function(){"use strict";const t={name:"BurgerButton",props:{active:Boolean,barWidth:{type:Number,default:80},barHeight:{type:Number,default:10},barColor:{type:String,default:"#000000"}}};var e=function(t,e){var r=e._c;return r("button",e._g(e._b({class:["burguer-button",{"-active":e.props.active},e.data.staticClass,e.data.class],style:{width:e.props.barWidth+"px",height:6*e.props.barHeight+"px"},attrs:{"aria-expanded":e.props.active?"true":"false","aria-label":"Menu","aria-controls":"navigation"}},"button",e.data.attrs,!1),e.data.on),e._l(3,function(t){return r("span",{key:t,staticClass:"bar",style:{width:e.props.barWidth+"px",height:e.props.barHeight+"px",backgroundColor:e.props.barColor}})}))};e._withStripped=!0;return function(t,e,r,a,n,o,i,s){const u=("function"==typeof r?r.options:r)||{};return u.__file="/Users/vitorcavalcanti/Projects/vue-burger-button/src/BurgerButton.vue",u.render||(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,n&&(u.functional=!0)),u._scopeId=a,u}({render:e,staticRenderFns:[]},0,t,void 0,!0)}); //# sourceMappingURL=vue-burger-button.min.js.map