-
Notifications
You must be signed in to change notification settings - Fork 857
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fix GH-195: Use a spinner component to convey activity while logging in
- Loading branch information
Showing
7 changed files
with
103 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
var range = require('lodash.range'); | ||
var React = require('react'); | ||
|
||
require('./spinner.scss'); | ||
|
||
var Spinner = React.createClass({ | ||
// Adapted from http://tobiasahlin.com/spinkit/ | ||
type: 'Spinner', | ||
render: function () { | ||
return ( | ||
<div className="spinner"> | ||
{range(1,13).map(function (id) { | ||
return <div className={'circle' + id + ' circle'}></div>; | ||
})} | ||
</div> | ||
); | ||
} | ||
}); | ||
|
||
module.exports = 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
@import "../../colors"; | ||
|
||
.spinner { | ||
position: relative; | ||
width: 20px; | ||
height: 20px; | ||
|
||
.circle { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
|
||
&:before { | ||
display: block; | ||
animation: circleFadeDelay 1.2s infinite ease-in-out both; | ||
margin: 0 auto; | ||
border-radius: 100%; | ||
background-color: darken($ui-blue, 8%); | ||
width: 15%; | ||
height: 15%; | ||
content: ""; | ||
-webkit-animation: circleFadeDelay 1.2s infinite ease-in-out both; | ||
} | ||
} | ||
|
||
@for $i from 1 through 12 { | ||
$rotation: 30deg * ($i - 1); | ||
$delay: -1.3s + $i * .1; | ||
.circle#{$i} { | ||
transform: rotate($rotation); | ||
-ms-transform: rotate($rotation); | ||
-webkit-transform: rotate($rotation); | ||
} | ||
.circle#{$i}:before { | ||
animation-delay: $delay; | ||
-webkit-animation-delay: $delay; | ||
} | ||
} | ||
|
||
} | ||
|
||
@keyframes circleFadeDelay { | ||
0%, 39%, 100% { opacity: 0; } | ||
40% { opacity: 1; } | ||
} |
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