custom-bootstrap-vue
Version:
Custom version of bootstrap-vue created for providing specific theme to a particular project
42 lines (37 loc) • 904 B
JavaScript
import Vue from '../../utils/vue'
import { getComponentConfig } from '../../utils/config'
import { BIcon } from '../../icons'
const NAME = 'BSkeletonIcon'
// @vue/component
export const BSkeletonIcon = /*#__PURE__*/ Vue.extend({
name: NAME,
functional: true,
props: {
animation: {
type: String,
default: () => getComponentConfig(NAME, '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]
)
}
})