rjsf-antd
Version:
Ant Design theme, fields and widgets for react-jsonschema-form
12 lines • 611 B
JavaScript
import React from 'react';
import { Checkbox } from 'antd';
var CheckboxWidget = function (props) {
var value = props.value, disabled = props.disabled, readonly = props.readonly, autofocus = props.autofocus, onChange = props.onChange;
var _onChange = function (_a) {
var checked = _a.target.checked;
return onChange(checked);
};
return (React.createElement(Checkbox, { checked: typeof value === 'undefined' ? false : value, disabled: disabled || readonly, autoFocus: autofocus, onChange: _onChange }));
};
export default CheckboxWidget;
//# sourceMappingURL=CheckboxWidget.js.map