From c8f407b52fa2b9f33709f521f6ea398b61e2ced6 Mon Sep 17 00:00:00 2001 From: pbca26 Date: Tue, 16 May 2017 08:29:18 +0300 Subject: [PATCH] addcoin modal animation --- react/src/components/addcoin/addcoin.js | 15 ++++++++++++--- react/src/components/dashboard/receiveCoin.js | 4 ++-- react/src/components/dashboard/walletsData.js | 2 +- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/react/src/components/addcoin/addcoin.js b/react/src/components/addcoin/addcoin.js index 4f55e92..725b509 100644 --- a/react/src/components/addcoin/addcoin.js +++ b/react/src/components/addcoin/addcoin.js @@ -36,6 +36,7 @@ class AddCoin extends React.Component { }, display: false, actionsMenu: false, + modalClassName: 'hide', }; this.activateCoin = this.activateCoin.bind(this); this.dismiss = this.dismiss.bind(this); @@ -56,7 +57,7 @@ class AddCoin extends React.Component { loadCoinSelection() { shepherdGetCoinList() .then(function(json) { - if (json.msg !== 'error') { + if (json.msg !== 'error') { this.setState(Object.assign({}, this.state, { coins: json.result, actionsMenu: false, @@ -90,10 +91,18 @@ class AddCoin extends React.Component { } componentWillReceiveProps(props) { - if (props) { + if (props && props.display !== this.state.display) { this.setState(Object.assign({}, this.state, { display: props.display, + modalClassName: props.display ? 'show fade' : 'show fade', })); + + setTimeout(function() { + this.setState(Object.assign({}, this.state, { + display: props.display, + modalClassName: props.display ? 'show in' : 'hide', + })); + }.bind(this), 100); } } @@ -307,7 +316,7 @@ class AddCoin extends React.Component { return (