UNPKG

bootstrap-vue

Version:

BootstrapVue provides one of the most comprehensive implementations of Bootstrap 4 components and grid system for Vue.js and with extensive and automated WAI-ARIA accessibility markup.

48 lines (44 loc) 1.18 kB
import { mergeData } from 'vue-functional-data-merge' import prefixPropName from '../../utils/prefix-prop-name' import copyProps from '../../utils/copyProps' import { assign } from '../../utils/object' import cardMixin from '../../mixins/card-mixin' export const props = assign( {}, copyProps(cardMixin.props, prefixPropName.bind(null, 'footer')), { footer: { type: String, default: null }, footerClass: { type: [String, Object, Array], default: null } } ) export default { functional: true, props, render (h, { props, data, slots }) { return h( props.footerTag, mergeData(data, { staticClass: 'card-footer', class: [ props.footerClass, { [`bg-${props.footerBgVariant}`]: Boolean(props.footerBgVariant), [`border-${props.footerBorderVariant}`]: Boolean( props.footerBorderVariant ), [`text-${props.footerTextVariant}`]: Boolean( props.footerTextVariant ) } ] }), slots().default || [h('div', { domProps: { innerHTML: props.footer } })] ) } }