1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

feat - add down caret on asset list (#8198)

This commit is contained in:
Brad Decker 2020-03-16 17:50:07 -05:00 committed by GitHub
parent 6828eaaee1
commit 7d374ab8d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 4 deletions

View File

@ -673,6 +673,7 @@
display: flex;
flex-flow: column nowrap;
margin-left: 8px;
flex-grow: 1;
}
&__symbol {

View File

@ -86,14 +86,14 @@ export default class SendAssetRow extends Component {
onClick={this.closeDropdown}
/>
<div className="send-v2__asset-dropdown__list">
{ this.renderEth() }
{ this.props.tokens.map((token) => this.renderAsset(token)) }
{ this.renderEth(true) }
{ this.props.tokens.map((token) => this.renderAsset(token, true)) }
</div>
</div>
)
}
renderEth () {
renderEth (insideDropdown = false) {
const { t } = this.context
const { accounts, selectedAddress } = this.props
@ -117,12 +117,15 @@ export default class SendAssetRow extends Component {
/>
</div>
</div>
{ !insideDropdown && this.props.tokens.length > 0 && (
<i className="fa fa-caret-down fa-lg simple-dropdown__caret" />
)}
</div>
)
}
renderAsset (token) {
renderAsset (token, insideDropdown = false) {
const { address, symbol } = token
const { t } = this.context
@ -147,6 +150,9 @@ export default class SendAssetRow extends Component {
/>
</div>
</div>
{ !insideDropdown && (
<i className="fa fa-caret-down fa-lg simple-dropdown__caret" />
)}
</div>
)
}