@quillforms/blocklib-multiple-choice-block
Version:
Multiple choice block for quillforms
22 lines (21 loc) • 647 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
const getChoices = ({
attributes
}) => {
var _attributes$choices, _attributes$other;
const choices = (_attributes$choices = attributes?.choices) !== null && _attributes$choices !== void 0 ? _attributes$choices : [];
const other = (_attributes$other = attributes?.other) !== null && _attributes$other !== void 0 ? _attributes$other : false;
if (other) {
choices.push({
type: 'other',
label: 'Other'
});
}
return choices;
};
var _default = exports.default = getChoices;
//# sourceMappingURL=get-choices.js.map