UNPKG

bootstrap-vue

Version:

BootstrapVue, with over 40 plugins and more than 75 custom components, provides one of the most comprehensive implementations of Bootstrap v4 components and grid system for Vue.js. With extensive and automated WAI-ARIA accessibility markup.

46 lines (42 loc) 2.12 kB
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } import Vue from '../../utils/vue'; import { mergeData } from 'vue-functional-data-merge'; import prefixPropName from '../../utils/prefix-prop-name'; import copyProps from '../../utils/copy-props'; import { htmlOrText } from '../../utils/html'; import cardMixin from '../../mixins/card-mixin'; export var props = _objectSpread({}, copyProps(cardMixin.props, prefixPropName.bind(null, 'header')), { header: { type: String, default: null }, headerHtml: { type: String, default: null }, headerClass: { type: [String, Object, Array], default: null } // @vue/component }); export var BCardHeader = /*#__PURE__*/ Vue.extend({ name: 'BCardHeader', functional: true, props: props, render: function render(h, _ref) { var _ref2; var props = _ref.props, data = _ref.data, children = _ref.children; return h(props.headerTag, mergeData(data, { staticClass: 'card-header', class: [props.headerClass, (_ref2 = {}, _defineProperty(_ref2, "bg-".concat(props.headerBgVariant), Boolean(props.headerBgVariant)), _defineProperty(_ref2, "border-".concat(props.headerBorderVariant), Boolean(props.headerBorderVariant)), _defineProperty(_ref2, "text-".concat(props.headerTextVariant), Boolean(props.headerTextVariant)), _ref2)] }), children || [h('div', { domProps: htmlOrText(props.headerHtml, props.header) })]); } }); export default BCardHeader;