aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/website/ts')
-rw-r--r--packages/website/ts/components/inputs/token_amount_input.tsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/website/ts/components/inputs/token_amount_input.tsx b/packages/website/ts/components/inputs/token_amount_input.tsx
index f39341a4f..1ae9bc85e 100644
--- a/packages/website/ts/components/inputs/token_amount_input.tsx
+++ b/packages/website/ts/components/inputs/token_amount_input.tsx
@@ -8,9 +8,9 @@ import {BalanceBoundedInput} from 'ts/components/inputs/balance_bounded_input';
import {InputErrMsg, Token, TokenState, ValidatedBigNumberCallback, WebsitePaths} from 'ts/types';
interface TokenAmountInputProps {
- label: string;
token: Token;
tokenState: TokenState;
+ label?: string;
amount?: BigNumber;
shouldShowIncompleteErrs: boolean;
shouldCheckBalance: boolean;
@@ -26,8 +26,9 @@ export class TokenAmountInput extends React.Component<TokenAmountInputProps, Tok
const amount = this.props.amount ?
ZeroEx.toUnitAmount(this.props.amount, this.props.token.decimals) :
undefined;
+ const hasLabel = !_.isUndefined(this.props.label);
return (
- <div className="flex overflow-hidden" style={{height: 84}}>
+ <div className="flex overflow-hidden" style={{height: hasLabel ? 84 : 62}}>
<BalanceBoundedInput
label={this.props.label}
amount={amount}
@@ -38,7 +39,7 @@ export class TokenAmountInput extends React.Component<TokenAmountInputProps, Tok
shouldShowIncompleteErrs={this.props.shouldShowIncompleteErrs}
onVisitBalancesPageClick={this.props.onVisitBalancesPageClick}
/>
- <div style={{paddingTop: 39}}>
+ <div style={{paddingTop: hasLabel ? 39 : 14}}>
{this.props.token.symbol}
</div>
</div>