UNPKG

bootstrap-vue

Version:

Quickly integrate Bootstrap 4 components with Vue.js

44 lines (40 loc) 1.23 kB
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 { mergeData } from "../../utils"; import { arrayIncludes } from "../../utils/array"; export var props = { vertical: { type: Boolean, default: false }, size: { type: String, default: null, validator: function validator(size) { return arrayIncludes(["sm", "", "lg"], size); } }, tag: { type: String, default: "div" }, ariaRole: { type: String, default: "group" } }; export default { functional: true, props: props, render: function render(h, _ref) { var props = _ref.props, data = _ref.data, children = _ref.children; return h(props.tag, mergeData(data, { class: _defineProperty({ "btn-group": !props.vertical, "btn-group-vertical": props.vertical }, "btn-group-" + props.size, Boolean(props.size)), attrs: { "role": props.ariaRole } }), children); } };