diff --git a/lib/cjs/components/form/PasswordField.d.ts b/lib/cjs/components/form/PasswordField.d.ts index 936bace2..3e500c53 100644 --- a/lib/cjs/components/form/PasswordField.d.ts +++ b/lib/cjs/components/form/PasswordField.d.ts @@ -1,6 +1,6 @@ import React from 'react'; import { TextFieldProps } from './TextField'; -export interface PasswordFieldProps extends Omit { +export interface PasswordFieldProps extends Omit { name?: string; } declare const PasswordField: React.FC; diff --git a/lib/cjs/components/form/PasswordField.js b/lib/cjs/components/form/PasswordField.js index 02f3cc6a..f0d83c5a 100644 --- a/lib/cjs/components/form/PasswordField.js +++ b/lib/cjs/components/form/PasswordField.js @@ -32,7 +32,7 @@ var yup_1 = require("yup"); var TextField_1 = __importDefault(require("./TextField")); var PasswordField = function (_a) { var _b = _a.name, name = _b === void 0 ? 'password' : _b, _c = _a.InputProps, InputProps = _c === void 0 ? {} : _c, _d = _a.validate, validate = _d === void 0 ? (0, yup_1.string)() : _d, otherTextFieldProps = __rest(_a, ["name", "InputProps", "validate"]); - return (react_1.default.createElement(TextField_1.default, __assign({ required: true, type: 'password', name: name, validate: validate, InputProps: __assign(__assign({}, InputProps), { endAdornment: (react_1.default.createElement(material_1.InputAdornment, { position: 'end' }, + return (react_1.default.createElement(TextField_1.default, __assign({ type: 'password', name: name, validate: validate, InputProps: __assign(__assign({}, InputProps), { endAdornment: (react_1.default.createElement(material_1.InputAdornment, { position: 'end' }, react_1.default.createElement(icons_material_1.Security, null))) }) }, otherTextFieldProps))); }; exports.default = PasswordField; diff --git a/lib/esm/components/form/PasswordField.d.ts b/lib/esm/components/form/PasswordField.d.ts index 936bace2..3e500c53 100644 --- a/lib/esm/components/form/PasswordField.d.ts +++ b/lib/esm/components/form/PasswordField.d.ts @@ -1,6 +1,6 @@ import React from 'react'; import { TextFieldProps } from './TextField'; -export interface PasswordFieldProps extends Omit { +export interface PasswordFieldProps extends Omit { name?: string; } declare const PasswordField: React.FC; diff --git a/lib/esm/components/form/PasswordField.js b/lib/esm/components/form/PasswordField.js index 2f1a3706..161097a4 100644 --- a/lib/esm/components/form/PasswordField.js +++ b/lib/esm/components/form/PasswordField.js @@ -27,7 +27,7 @@ import { string as YupString } from 'yup'; import TextField from './TextField'; var PasswordField = function (_a) { var _b = _a.name, name = _b === void 0 ? 'password' : _b, _c = _a.InputProps, InputProps = _c === void 0 ? {} : _c, _d = _a.validate, validate = _d === void 0 ? YupString() : _d, otherTextFieldProps = __rest(_a, ["name", "InputProps", "validate"]); - return (React.createElement(TextField, __assign({ required: true, type: 'password', name: name, validate: validate, InputProps: __assign(__assign({}, InputProps), { endAdornment: (React.createElement(InputAdornment, { position: 'end' }, + return (React.createElement(TextField, __assign({ type: 'password', name: name, validate: validate, InputProps: __assign(__assign({}, InputProps), { endAdornment: (React.createElement(InputAdornment, { position: 'end' }, React.createElement(SecurityIcon, null))) }) }, otherTextFieldProps))); }; export default PasswordField;