aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/gas-tooltip.js
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2017-08-26 07:23:30 +0800
committerDan <danjm.com@gmail.com>2017-08-26 07:24:04 +0800
commitc9e134a996f69367155aab416abb683fb82d4b9a (patch)
treea4a9a435794eac9eef3db75c4f55a4431cb2e901 /ui/app/components/gas-tooltip.js
parent05e6eaf171a16c96760cc899ef527a8f6d83434d (diff)
downloadtangerine-wallet-browser-c9e134a996f69367155aab416abb683fb82d4b9a.tar.gz
tangerine-wallet-browser-c9e134a996f69367155aab416abb683fb82d4b9a.tar.zst
tangerine-wallet-browser-c9e134a996f69367155aab416abb683fb82d4b9a.zip
Fully connect gas data in send form and tooltip to state; final styling improvements.
Fully connect gas fields in send form and tooltip to state
Diffstat (limited to 'ui/app/components/gas-tooltip.js')
-rw-r--r--ui/app/components/gas-tooltip.js17
1 files changed, 12 insertions, 5 deletions
diff --git a/ui/app/components/gas-tooltip.js b/ui/app/components/gas-tooltip.js
index 91a07c738..de2f8046b 100644
--- a/ui/app/components/gas-tooltip.js
+++ b/ui/app/components/gas-tooltip.js
@@ -18,6 +18,12 @@ function GasTooltip () {
this.updateGasLimit = this.updateGasLimit.bind(this);
}
+GasTooltip.prototype.componentWillMount = function () {
+ const { gasPrice = 0, gasLimit = 0} = this.props
+
+ this.setState({ gasPrice, gasLimit })
+}
+
GasTooltip.prototype.updateGasPrice = function (newPrice) {
const { onFeeChange } = this.props
const { gasLimit } = this.state
@@ -57,7 +63,11 @@ GasTooltip.prototype.render = function () {
initValue: gasPrice,
onChange: (newPrice) => this.updateGasPrice(newPrice),
}),
- h('div.gas-tooltip-input-label', {}, [
+ h('div.gas-tooltip-input-label', {
+ style: {
+ 'marginTop': '81px',
+ },
+ }, [
h('span.gas-tooltip-label', {}, ['Gas Limit']),
h('i.fa.fa-info-circle')
]),
@@ -104,10 +114,7 @@ GasTooltip.prototype.componentWillUnmount = function () {
GasTooltip.prototype.globalClickOccurred = function (event) {
const target = event.target
const container = findDOMNode(this)
- console.log(`target`, target);
- console.log(`container`, container);
- console.log(`this.container`, this.container);
- console.log(`this.outsideClickHandler`, this.outsideClickHandler);
+
if (target !== container &&
!isDescendant(container, target) &&
this.outsideClickHandler) {