aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/dropdowns
diff options
context:
space:
mode:
authorDan Miller <danjm.com@gmail.com>2018-12-05 14:15:45 +0800
committerDan Miller <danjm.com@gmail.com>2018-12-13 01:23:37 +0800
commit47501a6f7ad092f9d941fffac1b3b5cc557c65c3 (patch)
treeb3f2ab7f7914fde1e95ef3372f521dd546e09583 /ui/app/components/dropdowns
parent970bdebb863388b862c51ff46fb7b83875080746 (diff)
downloadtangerine-wallet-browser-47501a6f7ad092f9d941fffac1b3b5cc557c65c3.tar.gz
tangerine-wallet-browser-47501a6f7ad092f9d941fffac1b3b5cc557c65c3.tar.zst
tangerine-wallet-browser-47501a6f7ad092f9d941fffac1b3b5cc557c65c3.zip
Add spinner and dropdown arrow to network indicator on custom network loading.
Diffstat (limited to 'ui/app/components/dropdowns')
-rw-r--r--ui/app/components/dropdowns/components/network-dropdown-icon.js32
1 files changed, 24 insertions, 8 deletions
diff --git a/ui/app/components/dropdowns/components/network-dropdown-icon.js b/ui/app/components/dropdowns/components/network-dropdown-icon.js
index a45da4c10..d4a2c2ff7 100644
--- a/ui/app/components/dropdowns/components/network-dropdown-icon.js
+++ b/ui/app/components/dropdowns/components/network-dropdown-icon.js
@@ -16,16 +16,32 @@ NetworkDropdownIcon.prototype.render = function () {
isSelected,
innerBorder = 'none',
diameter = '12',
+ loading,
} = this.props
- return h(`.menu-icon-circle${isSelected ? '--active' : ''}`, {},
- h('div', {
+ return loading
+ ? h('span.pointer.network-indicator', {
style: {
- background: backgroundColor,
- border: innerBorder,
- height: `${diameter}px`,
- width: `${diameter}px`,
+ display: 'flex',
+ alignItems: 'center',
+ flexDirection: 'row',
},
- })
- )
+ }, [
+ h('img', {
+ style: {
+ width: '27px',
+ },
+ src: 'images/loading.svg',
+ }),
+ ])
+ : h(`.menu-icon-circle${isSelected ? '--active' : ''}`, {},
+ h('div', {
+ style: {
+ background: backgroundColor,
+ border: innerBorder,
+ height: `${diameter}px`,
+ width: `${diameter}px`,
+ },
+ })
+ )
}