UNPKG

@iebh/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

46 lines (39 loc) 1.1 kB
import { Vue } from '../../vue' import { NAME_SKELETON_ICON } from '../../constants/components' import { PROP_TYPE_OBJECT, PROP_TYPE_STRING } from '../../constants/props' import { makeProp, makePropsConfigurable } from '../../utils/props' import { BIcon } from '../../icons' // --- Props --- export const props = makePropsConfigurable( { animation: makeProp(PROP_TYPE_STRING, 'wave'), icon: makeProp(PROP_TYPE_STRING), iconProps: makeProp(PROP_TYPE_OBJECT, {}) }, NAME_SKELETON_ICON ) // --- Main component --- // @vue/component export const BSkeletonIcon = /*#__PURE__*/ Vue.extend({ name: NAME_SKELETON_ICON, functional: true, props, render(h, { props }) { const { icon, animation } = props const $icon = h(BIcon, { staticClass: 'b-skeleton-icon', props: { ...props.iconProps, icon } }) return h( 'div', { staticClass: 'b-skeleton-icon-wrapper position-relative d-inline-block overflow-hidden', class: { [`b-skeleton-animate-${animation}`]: animation } }, [$icon] ) } })