diff --git a/src/MigrateV2.tsx b/src/MigrateV2.tsx index 8758a22..97dc4e2 100644 --- a/src/MigrateV2.tsx +++ b/src/MigrateV2.tsx @@ -24,6 +24,7 @@ import { Checkbox, FormGroup, FormControlLabel, CircularProgress } from "@materi import Alert from "@material-ui/lab/Alert"; import { arrayToChunkIterator } from "./helpers"; import { ContactType, EventType, TaskType, PimType } from "./pim-types"; +import PasswordField from "./widgets/PasswordField"; interface PropsType { etesync: CredentialsData; @@ -107,7 +108,11 @@ export default function MigrateV2(props: PropsType) { forgotPassword: { paddingTop: 20, }, + alertInfo: { + marginTop: 20, + }, textField: { + width: "20em", marginTop: 20, }, submit: { @@ -333,8 +338,7 @@ export default function MigrateV2(props: PropsType) { onChange={handleInputChange(setUsername)} /> - {advancedSettings} {errors.errorGeneral && ( - {errors.errorGeneral} + {errors.errorGeneral} )} {progress && ( - {progress} + {progress} )} & { helperText?: string, label?: string }) { + const [showPassword, setShowPassword] = React.useState(false); + const formId_ = React.useMemo(() => formIdCounter++, []); + const { helperText, label, style, id, ...props } = props_; + const formId = `password-field-${id ?? formId_}`; + + return ( + + {label} + + setShowPassword(!showPassword)} + > + {showPassword ? : } + + + )} + /> + {helperText} + + ); +}