UNPKG

@gitlab/ui

Version:
38 lines (32 loc) 1.04 kB
import { extend } from '../../vue'; import { NAME_FORM_CHECKBOX_GROUP } from '../../constants/components'; import { PROP_TYPE_ARRAY, PROP_TYPE_BOOLEAN } from '../../constants/props'; import { sortKeys } from '../../utils/object'; import { makePropsConfigurable, makeProp } from '../../utils/props'; import { props as props$1, MODEL_PROP_NAME, formRadioCheckGroupMixin } from '../../mixins/form-radio-check-group'; // --- Props --- const props = makePropsConfigurable(sortKeys({ ...props$1, [MODEL_PROP_NAME]: makeProp(PROP_TYPE_ARRAY, []), // Custom switch styling switches: makeProp(PROP_TYPE_BOOLEAN, false) }), NAME_FORM_CHECKBOX_GROUP); // --- Main component --- // @vue/component const BFormCheckboxGroup = /*#__PURE__*/extend({ name: NAME_FORM_CHECKBOX_GROUP, // Includes render function mixins: [formRadioCheckGroupMixin], provide() { return { getBvCheckGroup: () => this }; }, props, computed: { isRadioGroup() { return false; } } }); export { BFormCheckboxGroup, props };