diff options
author | Alexander Tseung <alextsg@gmail.com> | 2018-09-18 10:35:47 +0800 |
---|---|---|
committer | Alexander Tseung <alextsg@gmail.com> | 2018-09-20 05:31:10 +0800 |
commit | 27799363177bd1c5bc390d5903c1915d77bf82aa (patch) | |
tree | d5f7fa759e6db103004bbf66965a9e8f15365342 | |
parent | 95e1eff4ca3d784d6fcba21035a535f8f3398cdc (diff) | |
download | tangerine-wallet-browser-27799363177bd1c5bc390d5903c1915d77bf82aa.tar tangerine-wallet-browser-27799363177bd1c5bc390d5903c1915d77bf82aa.tar.gz tangerine-wallet-browser-27799363177bd1c5bc390d5903c1915d77bf82aa.tar.bz2 tangerine-wallet-browser-27799363177bd1c5bc390d5903c1915d77bf82aa.tar.lz tangerine-wallet-browser-27799363177bd1c5bc390d5903c1915d77bf82aa.tar.xz tangerine-wallet-browser-27799363177bd1c5bc390d5903c1915d77bf82aa.tar.zst tangerine-wallet-browser-27799363177bd1c5bc390d5903c1915d77bf82aa.zip |
Add transition effect to TransactionListItemDetails expander
-rw-r--r-- | ui/app/components/transaction-list-item/index.scss | 11 | ||||
-rw-r--r-- | ui/app/components/transaction-list-item/transaction-list-item.component.js | 31 |
2 files changed, 29 insertions, 13 deletions
diff --git a/ui/app/components/transaction-list-item/index.scss b/ui/app/components/transaction-list-item/index.scss index 427686c29..df513bb0c 100644 --- a/ui/app/components/transaction-list-item/index.scss +++ b/ui/app/components/transaction-list-item/index.scss @@ -6,6 +6,7 @@ justify-content: center; align-items: center; flex-direction: column; + background: $white; &__grid { cursor: pointer; @@ -117,4 +118,14 @@ background: #f3f4f7; width: 100%; } + + &__expander { + max-height: 0px; + width: 100%; + + &--show { + max-height: 1000px; + transition: max-height 300ms ease-out; + } + } } diff --git a/ui/app/components/transaction-list-item/transaction-list-item.component.js b/ui/app/components/transaction-list-item/transaction-list-item.component.js index 799562638..9dfba875e 100644 --- a/ui/app/components/transaction-list-item/transaction-list-item.component.js +++ b/ui/app/components/transaction-list-item/transaction-list-item.component.js @@ -1,5 +1,6 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' +import classnames from 'classnames' import Identicon from '../identicon' import TransactionStatus from '../transaction-status' import TransactionAction from '../transaction-action' @@ -176,19 +177,23 @@ export default class TransactionListItem extends PureComponent { { this.renderPrimaryCurrency() } { this.renderSecondaryCurrency() } </div> - { - showTransactionDetails && ( - <div className="transaction-list-item__details-container"> - <TransactionListItemDetails - transaction={transaction} - onRetry={this.handleRetry} - showRetry={showRetry && methodData.done} - onCancel={this.handleCancel} - showCancel={showCancel} - /> - </div> - ) - } + <div className={classnames('transaction-list-item__expander', { + 'transaction-list-item__expander--show': showTransactionDetails, + })}> + { + showTransactionDetails && ( + <div className="transaction-list-item__details-container"> + <TransactionListItemDetails + transaction={transaction} + onRetry={this.handleRetry} + showRetry={showRetry && methodData.done} + onCancel={this.handleCancel} + showCancel={showCancel} + /> + </div> + ) + } + </div> </div> ) } |