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.
41 lines (38 loc) • 662 B
JavaScript
import { mergeData } from 'vue-functional-data-merge'
export const props = {
id: {
type: String,
default: null
},
tag: {
type: String,
default: 'small'
},
textVariant: {
type: String,
default: 'muted'
},
inline: {
type: Boolean,
default: false
}
}
export default {
functional: true,
props,
render (h, { props, data, children }) {
return h(
props.tag,
mergeData(data, {
class: {
'form-text': !props.inline,
[`text-${props.textVariant}`]: Boolean(props.textVariant)
},
attrs: {
id: props.id
}
}),
children
)
}
}