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.
74 lines (63 loc) • 2.17 kB
JavaScript
;
exports.__esModule = true;
exports.default = exports.BRow = exports.props = void 0;
var _vue = _interopRequireDefault(require("../../utils/vue"));
var _vueFunctionalDataMerge = require("vue-functional-data-merge");
var _array = require("../../utils/array");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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; }
var COMMON_ALIGNMENT = ['start', 'end', 'center'];
var props = {
tag: {
type: String,
default: 'div'
},
noGutters: {
type: Boolean,
default: false
},
alignV: {
type: String,
default: null,
validator: function validator(str) {
return (0, _array.arrayIncludes)(COMMON_ALIGNMENT.concat(['baseline', 'stretch']), str);
}
},
alignH: {
type: String,
default: null,
validator: function validator(str) {
return (0, _array.arrayIncludes)(COMMON_ALIGNMENT.concat(['between', 'around']), str);
}
},
alignContent: {
type: String,
default: null,
validator: function validator(str) {
return (0, _array.arrayIncludes)(COMMON_ALIGNMENT.concat(['between', 'around', 'stretch']), str);
}
} // @vue/component
};
exports.props = props;
var BRow =
/*#__PURE__*/
_vue.default.extend({
name: 'BRow',
functional: true,
props: props,
render: function render(h, _ref) {
var _class;
var props = _ref.props,
data = _ref.data,
children = _ref.children;
return h(props.tag, (0, _vueFunctionalDataMerge.mergeData)(data, {
staticClass: 'row',
class: (_class = {
'no-gutters': props.noGutters
}, _defineProperty(_class, "align-items-".concat(props.alignV), props.alignV), _defineProperty(_class, "justify-content-".concat(props.alignH), props.alignH), _defineProperty(_class, "align-content-".concat(props.alignContent), props.alignContent), _class)
}), children);
}
});
exports.BRow = BRow;
var _default = BRow;
exports.default = _default;