UNPKG

bootstrap-vue

Version:

With more than 85 components, over 45 available plugins, several directives, and 1000+ icons, BootstrapVue provides one of the most comprehensive implementations of the Bootstrap v4 component and grid system available for Vue.js v2.6, complete with extens

38 lines (35 loc) 1.12 kB
import Vue, { mergeData } from '../../vue'; import { NAME_SKELETON_WRAPPER } from '../../constants/components'; import { SLOT_NAME_DEFAULT } from '../../constants/slot-names'; import { normalizeSlot } from '../../utils/normalize-slot'; // @vue/component export var BSkeletonWrapper = /*#__PURE__*/Vue.extend({ name: NAME_SKELETON_WRAPPER, functional: true, props: { loading: { type: Boolean, default: false } }, render: function render(h, _ref) { var data = _ref.data, props = _ref.props, slots = _ref.slots, scopedSlots = _ref.scopedSlots; var $slots = slots(); var $scopedSlots = scopedSlots || {}; var slotScope = {}; if (props.loading) { return h('div', mergeData(data, { attrs: { role: 'alert', 'aria-live': 'polite', 'aria-busy': true }, staticClass: 'b-skeleton-wrapper', key: 'loading' }), [normalizeSlot('loading', slotScope, $scopedSlots, $slots) || h()]); } return normalizeSlot(SLOT_NAME_DEFAULT, slotScope, $scopedSlots, $slots) || h(); } });