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

41 lines (37 loc) 960 B
import Vue from '../../vue' import { NAME_SKELETON_ICON } from '../../constants/components' import { getComponentConfig } from '../../utils/config' import { BIcon } from '../../icons' // @vue/component export const BSkeletonIcon = /*#__PURE__*/ Vue.extend({ name: NAME_SKELETON_ICON, functional: true, props: { animation: { type: String, default: () => getComponentConfig(NAME_SKELETON_ICON, 'animation') }, icon: { type: String }, iconProps: { type: Object, default: () => {} } }, render(h, { props }) { const { icon, animation } = props const $icon = h(BIcon, { props: { icon, ...props.iconProps }, staticClass: 'b-skeleton-icon' }) return h( 'div', { staticClass: 'b-skeleton-icon-wrapper position-relative d-inline-block overflow-hidden', class: { [`b-skeleton-animate-${animation}`]: animation } }, [$icon] ) } })