envoc-form
Version:
Envoc form components
29 lines (28 loc) • 973 B
JavaScript
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
import { jsx as _jsx } from "react/jsx-runtime";
import SelectGroup from './SelectGroup';
var booleanOptions = [
{
label: 'Yes',
value: true,
},
{
label: 'No',
value: false,
},
];
/** A `<SelectGroup/>` dropdown with two options. Default options are 'Yes' and 'No' with values of `true` and `false`. */
export function BooleanSelectGroup(props) {
var _a;
return (_jsx(SelectGroup, __assign({ multiple: false }, props, { options: (_a = props.options) !== null && _a !== void 0 ? _a : booleanOptions })));
}