aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-03-30 02:25:50 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-03-30 02:25:50 +0800
commit03b00ef8da0bafc464e14e5d8225b9a9514b19bd (patch)
treef7a4790c5dbd2757da01468463699064f121a465 /packages
parent665011174bab7cfc6ec53e0044d60e1463222aee (diff)
downloaddexon-0x-contracts-03b00ef8da0bafc464e14e5d8225b9a9514b19bd.tar.gz
dexon-0x-contracts-03b00ef8da0bafc464e14e5d8225b9a9514b19bd.tar.zst
dexon-0x-contracts-03b00ef8da0bafc464e14e5d8225b9a9514b19bd.zip
Style changes
Diffstat (limited to 'packages')
-rw-r--r--packages/website/ts/components/inputs/token_amount_input.tsx7
-rw-r--r--packages/website/ts/components/wallet/wrap_ether_item.tsx7
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}
/>