-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9e12a81
commit 4be9265
Showing
6 changed files
with
281 additions
and
453 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
|
||
import './loader.scss'; | ||
|
||
const Loader = ({ loaderColor }) => { | ||
return ( | ||
<div className='loader'> | ||
<span | ||
class='loader__circle' | ||
style={{ | ||
background: loaderColor, | ||
}} | ||
></span> | ||
<span | ||
class='loader__circle' | ||
style={{ | ||
background: loaderColor, | ||
}} | ||
></span> | ||
<span | ||
class='loader__circle' | ||
style={{ | ||
background: loaderColor, | ||
}} | ||
></span> | ||
<span | ||
class='loader__circle' | ||
style={{ | ||
background: loaderColor, | ||
}} | ||
></span> | ||
</div> | ||
); | ||
}; | ||
|
||
Loader.propTypes = { | ||
loaderColor: PropTypes.string, | ||
}; | ||
|
||
export default Loader; |
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,43 @@ | ||
@import '../../sass/base.scss'; | ||
@import '../../sass/variables.scss'; | ||
|
||
.loader{ | ||
height: 15px; | ||
width: 105px; | ||
display: flex; | ||
position: relative; | ||
|
||
&__circle{ | ||
width: 15px; | ||
height: 15px; | ||
border-radius: 50%; | ||
background-color: $indigo; | ||
animation: move 500ms linear 0ms infinite; | ||
margin-right: 30px; | ||
|
||
&:first-child{ | ||
position: absolute; | ||
top:0; | ||
left:0; | ||
animation: grow 500ms linear 0ms infinite; | ||
} | ||
|
||
&:last-child{ | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
margin-right: 0; | ||
animation: grow 500ms linear 0s infinite reverse; | ||
} | ||
} | ||
} | ||
|
||
@keyframes grow { | ||
from {transform: scale(0,0); opacity: 0;} | ||
to {transform: scale(1,1); opacity: 1;} | ||
} | ||
|
||
@keyframes move { | ||
from {transform: translateX(0px)} | ||
to {transform: translateX(45px)} | ||
} |
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,12 @@ | ||
import React from 'react'; | ||
import Loader from '../components/Loader/Loader'; | ||
|
||
export default { title: 'Loader' }; | ||
|
||
export const loader = () => ( | ||
<Loader /> | ||
) | ||
|
||
export const loaderColored = () => ( | ||
<Loader loaderColor="#010101"/> | ||
) |
Oops, something went wrong.