UNPKG

buefy

Version:

Lightweight UI components for Vue.js (v3) based on Bulma

3 lines (2 loc) 1.18 kB
/*! Buefy v3.0.0 | MIT License | github.com/buefy/buefy */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Skeleton={},e.Vue)}(this,(function(e,t){"use strict";const i=["","is-centered","is-right"],n=e=>{if(!e.active)return;const i=[],n=e.width,o=e.height;for(let d=0;d<e.count;d++)i.push(t.h("div",{class:["b-skeleton-item",{"is-rounded":e.rounded}],key:d,style:{height:void 0===o?null:isNaN(+o)?o:o+"px",width:void 0===n?null:isNaN(+n)?n:n+"px",borderRadius:e.circle?"50%":null}}));return t.h("div",{class:["b-skeleton",e.size,e.position,{"is-animated":e.animated}]},i)};n.props={active:{type:Boolean,default:!0},animated:{type:Boolean,default:!0},width:[Number,String],height:[Number,String],circle:Boolean,rounded:{type:Boolean,default:!0},count:{type:Number,default:1},position:{type:String,default:"",validator:e=>i.indexOf(e)>-1},size:String};const o={install(e){((e,t,i)=>{const n=i;e.component(n,t)})(e,n,"BSkeleton")}};e.BSkeleton=n,e.default=o,Object.defineProperty(e,"__esModule",{value:!0})}));