-
-
Notifications
You must be signed in to change notification settings - Fork 655
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wallet Loading States & Spinner Update (#334)
* Add disclaimer modal to footer * Remove duplicate code & unnecessary styles * Fix formatting noise * remove un-used css style * Fix tslint error & add media query for modals * Nest Media Query * Replace '???' with Spinner & update spinner * Add loading states for wallet balances * Update wallet test * Remove excess data passed to wallet balance reducer & Fix wallet balance types * Merge 'develop' into 'loading-indicator' * Add 'light' prop to Spinner * Only show spinners when fetching data * Remove format diff * Apply naming conventions * Remove network name when offline
- Loading branch information
1 parent
7e7c070
commit 0d5d0ce
Showing
23 changed files
with
215 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
.Spinner { | ||
animation: rotate 2s linear infinite; | ||
|
||
&-x1 { | ||
height: 1em; | ||
width: 1em; | ||
} | ||
|
||
&-x2 { | ||
height: 2em; | ||
width: 2em; | ||
} | ||
|
||
&-x3 { | ||
height: 3em; | ||
width: 3em; | ||
} | ||
|
||
&-x4 { | ||
height: 4em; | ||
width: 4em; | ||
} | ||
|
||
&-x5 { | ||
height: 5em; | ||
width: 5em; | ||
} | ||
|
||
& .path { | ||
stroke-linecap: round; | ||
animation: dash 1.5s ease-in-out infinite; | ||
} | ||
|
||
&-light { | ||
& .path { | ||
stroke: white; | ||
} | ||
} | ||
|
||
&-dark { | ||
& .path { | ||
stroke: #163151; | ||
} | ||
} | ||
} | ||
|
||
@keyframes rotate { | ||
100% { | ||
transform: rotate(360deg); | ||
} | ||
} | ||
|
||
@keyframes dash { | ||
0% { | ||
stroke-dasharray: 1, 150; | ||
stroke-dashoffset: 0; | ||
} | ||
50% { | ||
stroke-dasharray: 90, 150; | ||
stroke-dashoffset: -35; | ||
} | ||
100% { | ||
stroke-dasharray: 90, 150; | ||
stroke-dashoffset: -124; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,27 @@ | ||
import React from 'react'; | ||
import './Spinner.scss'; | ||
|
||
type Size = 'lg' | '2x' | '3x' | '4x' | '5x'; | ||
type Size = 'x1' | 'x2' | 'x3' | 'x4' | 'x5'; | ||
|
||
interface SpinnerProps { | ||
size?: Size; | ||
light?: boolean; | ||
} | ||
|
||
const Spinner = ({ size = 'fa-' }: SpinnerProps) => { | ||
return <i className={`fa fa-spinner fa-spin fa-${size ? size : 'fw'}`} />; | ||
const Spinner = ({ size = 'x1', light = false }: SpinnerProps) => { | ||
const color = light ? 'Spinner-light' : 'Spinner-dark'; | ||
return ( | ||
<svg className={`Spinner Spinner-${size} ${color}`} viewBox="0 0 50 50"> | ||
<circle | ||
className="path" | ||
cx="25" | ||
cy="25" | ||
r="20" | ||
fill="none" | ||
strokeWidth="5" | ||
/> | ||
</svg> | ||
); | ||
}; | ||
|
||
export default Spinner; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
common/containers/Tabs/Contracts/components/Deploy/components/DeployHoc/types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.