diff options
Diffstat (limited to 'packages/website')
-rw-r--r-- | packages/website/ts/components/inputs/token_amount_input.tsx | 7 | ||||
-rw-r--r-- | packages/website/ts/components/wallet/wrap_ether_item.tsx | 7 |
2 files changed, 9 insertions, 5 deletions
diff --git a/packages/website/ts/components/inputs/token_amount_input.tsx b/packages/website/ts/components/inputs/token_amount_input.tsx index 591be7c0c..9e638b67b 100644 --- a/packages/website/ts/components/inputs/token_amount_input.tsx +++ b/packages/website/ts/components/inputs/token_amount_input.tsx @@ -33,6 +33,9 @@ interface TokenAmountInputState { isBalanceAndAllowanceLoaded: boolean; } +const HEIGHT_WITH_LABEL = 84; +const HEIGHT_WITHOUT_LABEL = 62; + export class TokenAmountInput extends React.Component<TokenAmountInputProps, TokenAmountInputState> { public static defaultProps: Partial<TokenAmountInputProps> = { shouldShowErrs: true, @@ -72,7 +75,9 @@ export class TokenAmountInput extends React.Component<TokenAmountInputProps, Tok ? ZeroEx.toUnitAmount(this.props.amount, this.props.token.decimals) : undefined; const hasLabel = !_.isUndefined(this.props.label); - const style = !_.isUndefined(this.props.style) ? this.props.style : { height: hasLabel ? 84 : 62 }; + const style = !_.isUndefined(this.props.style) + ? this.props.style + : { height: hasLabel ? HEIGHT_WITH_LABEL : HEIGHT_WITHOUT_LABEL }; return ( <div className="flex overflow-hidden" style={style}> <BalanceBoundedInput diff --git a/packages/website/ts/components/wallet/wrap_ether_item.tsx b/packages/website/ts/components/wallet/wrap_ether_item.tsx index 71ce6894f..3a876721a 100644 --- a/packages/website/ts/components/wallet/wrap_ether_item.tsx +++ b/packages/website/ts/components/wallet/wrap_ether_item.tsx @@ -78,7 +78,7 @@ export class WrapEtherItem extends React.Component<WrapEtherItemProps, WrapEther <EthAmountInput balance={etherBalanceInEth} amount={this.state.currentInputAmount} - hintText={'0.00'} + hintText="0.00" onChange={this._onValueChange.bind(this)} shouldCheckBalance={true} shouldShowIncompleteErrs={false} @@ -98,9 +98,8 @@ export class WrapEtherItem extends React.Component<WrapEtherItemProps, WrapEther shouldCheckAllowance={false} onChange={this._onValueChange.bind(this)} amount={this.state.currentInputAmount} - hintText={'0.00'} - onVisitBalancesPageClick={_.noop} - shouldShowErrs={false} + hintText="0.00" + shouldShowErrs={false} // TODO: error handling shouldShowUnderline={false} style={styles.ethAmountInput} /> |