UNPKG

@gitlab/ui

Version:
46 lines (40 loc) 1.4 kB
import { extend } from '../../vue'; import { NAME_TABLE_SIMPLE } from '../../constants/components'; import { sortKeys } from '../../utils/object'; import { makePropsConfigurable } from '../../utils/props'; import { attrsMixin } from '../../mixins/attrs'; import { hasListenerMixin } from '../../mixins/has-listener'; import { props as props$1, idMixin } from '../../mixins/id'; import { normalizeSlotMixin } from '../../mixins/normalize-slot'; import { props as props$2, stackedMixin } from './helpers/mixin-stacked'; import { props as props$3, tableRendererMixin } from './helpers/mixin-table-renderer'; // --- Props --- const props = makePropsConfigurable(sortKeys({ ...props$1, ...props$2, ...props$3 }), NAME_TABLE_SIMPLE); // --- Main component --- // @vue/component const BTableSimple = /*#__PURE__*/extend({ name: NAME_TABLE_SIMPLE, // Order of mixins is important! // They are merged from first to last, followed by this component mixins: [ // General mixins attrsMixin, hasListenerMixin, idMixin, normalizeSlotMixin, // Required table mixins tableRendererMixin, // Table features mixins // Stacked requires extra handling by users via // the table cell `stacked-heading` prop stackedMixin], props, computed: { isTableSimple() { return true; } } // Render function is provided by `tableRendererMixin` }); export { BTableSimple, props };