UNPKG

@agentlab/rjsf-antd

Version:

Ant Design theme, fields and widgets for react-jsonschema-form

10 lines 699 B
import React from 'react'; import { Input } from 'antd'; const PasswordWidget = ({ id, required, readonly, disabled, value, onFocus, onBlur, onChange, options, autofocus, }) => { const _onChange = ({ target: { value } }) => onChange(value === '' ? options.emptyValue : value); const _onBlur = ({ target: { value } }) => onBlur(id, value); const _onFocus = ({ target: { value } }) => onFocus(id, value); return (React.createElement(Input, { autoFocus: autofocus, required: required, disabled: disabled || readonly, type: 'password', value: value, onFocus: _onFocus, onBlur: _onBlur, onChange: _onChange })); }; export default PasswordWidget; //# sourceMappingURL=PasswordWidget.js.map