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
58 lines (54 loc) • 1.28 kB
JavaScript
import Vue, { mergeData } from '../../vue';
import { NAME_FORM_VALID_FEEDBACK } from '../../constants/components';
export var props = {
id: {
type: String // default: null
},
tag: {
type: String,
default: 'div'
},
tooltip: {
type: Boolean,
default: false
},
forceShow: {
type: Boolean,
default: false
},
state: {
// Tri-state prop: `true`, `false`, or `null`
type: Boolean,
default: null
},
ariaLive: {
type: String // default: null
},
role: {
type: String // default: null
}
}; // @vue/component
export var BFormValidFeedback = /*#__PURE__*/Vue.extend({
name: NAME_FORM_VALID_FEEDBACK,
functional: true,
props: props,
render: function render(h, _ref) {
var props = _ref.props,
data = _ref.data,
children = _ref.children;
var show = props.forceShow === true || props.state === true;
return h(props.tag, mergeData(data, {
class: {
'valid-feedback': !props.tooltip,
'valid-tooltip': props.tooltip,
'd-block': show
},
attrs: {
id: props.id || null,
role: props.role || null,
'aria-live': props.ariaLive || null,
'aria-atomic': props.ariaLive ? 'true' : null
}
}), children);
}
});