@gitlab/ui
Version:
GitLab UI Components
42 lines (36 loc) • 778 B
JavaScript
import { extend, mergeData } from '../../vue';
import { NAME_FORM_SELECT_OPTION } from '../../constants/components';
// --- Props ---
const props = {
disabled: {
type: Boolean,
required: false,
default: false
},
value: {
required: true
}
};
// --- Main component ---
// @vue/component
const BFormSelectOption = /*#__PURE__*/extend({
name: NAME_FORM_SELECT_OPTION,
functional: true,
props,
render(h, _ref) {
let props = _ref.props,
data = _ref.data,
children = _ref.children;
const value = props.value,
disabled = props.disabled;
return h('option', mergeData(data, {
attrs: {
disabled
},
domProps: {
value
}
}), children);
}
});
export { BFormSelectOption, props };