Step 5: Fix newly-discovered TS issues
This commit is contained in:
parent
7e21da0c7f
commit
115ae198c8
3 changed files with 6 additions and 5 deletions
|
@ -37,7 +37,7 @@ interface IProps {
|
||||||
// Whether to wrap the page in a scrollbar
|
// Whether to wrap the page in a scrollbar
|
||||||
scrollbar?: boolean;
|
scrollbar?: boolean;
|
||||||
// Map of keys to replace with values, e.g {$placeholder: "value"}
|
// Map of keys to replace with values, e.g {$placeholder: "value"}
|
||||||
replaceMap?: Map<string, string>;
|
replaceMap?: Record<string, string>;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IState {
|
interface IState {
|
||||||
|
|
|
@ -174,7 +174,7 @@ export default class AccessSecretStorageDialog extends React.PureComponent<IProp
|
||||||
this.fileUpload.current.click();
|
this.fileUpload.current.click();
|
||||||
};
|
};
|
||||||
|
|
||||||
private onPassPhraseNext = async (ev: FormEvent<HTMLFormElement>) => {
|
private onPassPhraseNext = async (ev: FormEvent<HTMLFormElement> | React.MouseEvent) => {
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
|
|
||||||
if (this.state.passPhrase.length <= 0) return;
|
if (this.state.passPhrase.length <= 0) return;
|
||||||
|
@ -189,7 +189,7 @@ export default class AccessSecretStorageDialog extends React.PureComponent<IProp
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
private onRecoveryKeyNext = async (ev: FormEvent<HTMLFormElement>) => {
|
private onRecoveryKeyNext = async (ev: FormEvent<HTMLFormElement> | React.MouseEvent) => {
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
|
|
||||||
if (!this.state.recoveryKeyValid) return;
|
if (!this.state.recoveryKeyValid) return;
|
||||||
|
|
|
@ -30,8 +30,9 @@ interface IProps {
|
||||||
// If true, make the primary button a form submit button (input type="submit")
|
// If true, make the primary button a form submit button (input type="submit")
|
||||||
primaryIsSubmit?: boolean;
|
primaryIsSubmit?: boolean;
|
||||||
|
|
||||||
// onClick handler for the primary button.
|
// onClick handler for the primary button. Note that the returned promise, if
|
||||||
onPrimaryButtonClick?: (ev: React.MouseEvent) => void;
|
// returning a promise, is not used.
|
||||||
|
onPrimaryButtonClick?: (ev: React.MouseEvent) => (void | Promise<void>);
|
||||||
|
|
||||||
// should there be a cancel button? default: true
|
// should there be a cancel button? default: true
|
||||||
hasCancel?: boolean;
|
hasCancel?: boolean;
|
||||||
|
|
Loading…
Reference in a new issue