diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-05-14 16:36:13 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-14 16:36:13 +0800 |
commit | 58fa35641d3016ef106496c929e48febcf827dc6 (patch) | |
tree | 3f33c2faac3b55e52098ab0b5b9883a9b62f5aee /packages/website/ts/components/dialogs/send_dialog.tsx | |
parent | 6aed4fb1ae27dabed027c855f2cbdc0bfb4f3b6b (diff) | |
parent | b74957acdfc8d67d154bcb4698acd7575db7cc47 (diff) | |
download | dexon-sol-tools-58fa35641d3016ef106496c929e48febcf827dc6.tar dexon-sol-tools-58fa35641d3016ef106496c929e48febcf827dc6.tar.gz dexon-sol-tools-58fa35641d3016ef106496c929e48febcf827dc6.tar.bz2 dexon-sol-tools-58fa35641d3016ef106496c929e48febcf827dc6.tar.lz dexon-sol-tools-58fa35641d3016ef106496c929e48febcf827dc6.tar.xz dexon-sol-tools-58fa35641d3016ef106496c929e48febcf827dc6.tar.zst dexon-sol-tools-58fa35641d3016ef106496c929e48febcf827dc6.zip |
Merge pull request #585 from 0xProject/feature/typedef
Add missing type definitions. Enable typedef linter rule
Diffstat (limited to 'packages/website/ts/components/dialogs/send_dialog.tsx')
-rw-r--r-- | packages/website/ts/components/dialogs/send_dialog.tsx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/packages/website/ts/components/dialogs/send_dialog.tsx b/packages/website/ts/components/dialogs/send_dialog.tsx index 2af7fd7ac..421f18b4f 100644 --- a/packages/website/ts/components/dialogs/send_dialog.tsx +++ b/packages/website/ts/components/dialogs/send_dialog.tsx @@ -35,7 +35,7 @@ export class SendDialog extends React.Component<SendDialogProps, SendDialogState isAmountValid: false, }; } - public render() { + public render(): React.ReactNode { const transferDialogActions = [ <FlatButton key="cancelTransfer" label="Cancel" onTouchTap={this._onCancel.bind(this)} />, <FlatButton @@ -57,7 +57,7 @@ export class SendDialog extends React.Component<SendDialogProps, SendDialogState </Dialog> ); } - private _renderSendDialogBody() { + private _renderSendDialogBody(): React.ReactNode { return ( <div className="mx-auto" style={{ maxWidth: 300 }}> <div style={{ height: 80 }}> @@ -86,19 +86,19 @@ export class SendDialog extends React.Component<SendDialogProps, SendDialogState </div> ); } - private _onRecipientChange(recipient?: string) { + private _onRecipientChange(recipient?: string): void { this.setState({ shouldShowIncompleteErrs: false, recipient, }); } - private _onValueChange(isValid: boolean, amount?: BigNumber) { + private _onValueChange(isValid: boolean, amount?: BigNumber): void { this.setState({ isAmountValid: isValid, value: amount, }); } - private _onSendClick() { + private _onSendClick(): void { if (this._hasErrors()) { this.setState({ shouldShowIncompleteErrs: true, @@ -112,13 +112,13 @@ export class SendDialog extends React.Component<SendDialogProps, SendDialogState this.props.onComplete(this.state.recipient, value); } } - private _onCancel() { + private _onCancel(): void { this.setState({ value: undefined, }); this.props.onCancelled(); } - private _hasErrors() { + private _hasErrors(): boolean { return _.isUndefined(this.state.recipient) || _.isUndefined(this.state.value) || !this.state.isAmountValid; } } |