aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/inputs/eth_amount_input.tsx
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-05-18 03:00:00 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-05-18 04:04:39 +0800
commite9e570db4f158119dc86141201b695f52b3a5ca2 (patch)
treedef4514311e9a16b5ca96c58beba5028a13b8d2e /packages/website/ts/components/inputs/eth_amount_input.tsx
parent5bc83fceaa3c281e45af0f30ace67643554830c8 (diff)
downloaddexon-sol-tools-e9e570db4f158119dc86141201b695f52b3a5ca2.tar
dexon-sol-tools-e9e570db4f158119dc86141201b695f52b3a5ca2.tar.gz
dexon-sol-tools-e9e570db4f158119dc86141201b695f52b3a5ca2.tar.bz2
dexon-sol-tools-e9e570db4f158119dc86141201b695f52b3a5ca2.tar.lz
dexon-sol-tools-e9e570db4f158119dc86141201b695f52b3a5ca2.tar.xz
dexon-sol-tools-e9e570db4f158119dc86141201b695f52b3a5ca2.tar.zst
dexon-sol-tools-e9e570db4f158119dc86141201b695f52b3a5ca2.zip
Center all the things
Diffstat (limited to 'packages/website/ts/components/inputs/eth_amount_input.tsx')
-rw-r--r--packages/website/ts/components/inputs/eth_amount_input.tsx9
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/website/ts/components/inputs/eth_amount_input.tsx b/packages/website/ts/components/inputs/eth_amount_input.tsx
index 862ba25f8..fa684d85c 100644
--- a/packages/website/ts/components/inputs/eth_amount_input.tsx
+++ b/packages/website/ts/components/inputs/eth_amount_input.tsx
@@ -20,6 +20,8 @@ interface EthAmountInputProps {
shouldShowErrs?: boolean;
shouldShowUnderline?: boolean;
style?: React.CSSProperties;
+ labelStyle?: React.CSSProperties;
+ inputHintStyle?: React.CSSProperties;
}
interface EthAmountInputState {}
@@ -49,8 +51,10 @@ export class EthAmountInput extends React.Component<EthAmountInputProps, EthAmou
hintText={this.props.hintText}
shouldShowErrs={this.props.shouldShowErrs}
shouldShowUnderline={this.props.shouldShowUnderline}
+ inputStyle={this.props.style}
+ inputHintStyle={this.props.inputHintStyle}
/>
- <div style={{ paddingTop: _.isUndefined(this.props.label) ? 15 : 40 }}>ETH</div>
+ <div style={this._getLabelStyle()}>ETH</div>
</div>
);
}
@@ -60,4 +64,7 @@ export class EthAmountInput extends React.Component<EthAmountInputProps, EthAmou
: ZeroEx.toBaseUnitAmount(amount, constants.DECIMAL_PLACES_ETH);
this.props.onChange(isValid, baseUnitAmountIfExists);
}
+ private _getLabelStyle(): React.CSSProperties {
+ return this.props.labelStyle || { paddingTop: _.isUndefined(this.props.label) ? 15 : 40 };
+ }
}