aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/inputs
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/website/ts/components/inputs
parent665011174bab7cfc6ec53e0044d60e1463222aee (diff)
downloaddexon-sol-tools-03b00ef8da0bafc464e14e5d8225b9a9514b19bd.tar
dexon-sol-tools-03b00ef8da0bafc464e14e5d8225b9a9514b19bd.tar.gz
dexon-sol-tools-03b00ef8da0bafc464e14e5d8225b9a9514b19bd.tar.bz2
dexon-sol-tools-03b00ef8da0bafc464e14e5d8225b9a9514b19bd.tar.lz
dexon-sol-tools-03b00ef8da0bafc464e14e5d8225b9a9514b19bd.tar.xz
dexon-sol-tools-03b00ef8da0bafc464e14e5d8225b9a9514b19bd.tar.zst
dexon-sol-tools-03b00ef8da0bafc464e14e5d8225b9a9514b19bd.zip
Style changes
Diffstat (limited to 'packages/website/ts/components/inputs')
-rw-r--r--packages/website/ts/components/inputs/token_amount_input.tsx7
1 files changed, 6 insertions, 1 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