File tree Expand file tree Collapse file tree 3 files changed +53
-59
lines changed Expand file tree Collapse file tree 3 files changed +53
-59
lines changed Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
+ import styled , { keyframes } from 'styled-components' ;
3
+ import { prop , remSize } from '../../../theme' ;
4
+
5
+ const skBounce = keyframes `
6
+ 0%, 100% {
7
+ transform: scale(0.0);
8
+ }
9
+ 50% {
10
+ transform: scale(1.0);
11
+ }
12
+ ` ;
13
+ const Container = styled . div `
14
+ &&& {
15
+ width: 100%;
16
+ height: 100%;
17
+ display: flex;
18
+ justify-content: center;
19
+ align-items: center;
20
+ background-color: ${ prop ( 'backgroundColor' ) } ;
21
+ }
22
+ ` ;
23
+ const LoaderWrapper = styled . div `
24
+ &&& {
25
+ width: ${ remSize ( 80 ) } ;
26
+ height: ${ remSize ( 80 ) } ;
27
+ position: relative;
28
+ }
29
+ ` ;
30
+ const LoaderCircle = styled . div `
31
+ &&& {
32
+ width: 100%;
33
+ height: 100%;
34
+ border-radius: 80%;
35
+ background-color: ${ prop ( 'logoColor' ) } ;
36
+ opacity: 0.6;
37
+ position: absolute;
38
+ top: 0;
39
+ left: 0;
40
+ animation: ${ skBounce } 2s infinite ease-in-out;
41
+ &:nth-child(2) {
42
+ animation-delay: -1s;
43
+ }
44
+ }
45
+ ` ;
2
46
3
47
const Loader = ( ) => (
4
- < div className = "loader-container" >
5
- < div className = "loader" >
6
- < div className = "loader__circle1" />
7
- < div className = "loader__circle2" />
8
- </ div >
9
- </ div >
48
+ < Container >
49
+ < LoaderWrapper >
50
+ < LoaderCircle />
51
+ < LoaderCircle />
52
+ </ LoaderWrapper >
53
+ </ Container >
10
54
) ;
11
55
export default Loader ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ const baseThemes = {
75
75
inactiveTextColor : grays . middleDark ,
76
76
backgroundColor : grays . lighter ,
77
77
accentColor : colors . p5jsPink ,
78
+ logoColor : colors . p5jsPink ,
78
79
79
80
Button : {
80
81
primary : {
@@ -162,6 +163,7 @@ const baseThemes = {
162
163
inactiveTextColor : grays . middleLight ,
163
164
backgroundColor : grays . darker ,
164
165
accentColor : colors . p5jsPink ,
166
+ logoColor : colors . p5jsPink ,
165
167
166
168
Button : {
167
169
primary : {
@@ -248,6 +250,7 @@ export default {
248
250
...baseThemes ,
249
251
[ Theme . contrast ] : extend ( baseThemes [ Theme . dark ] , {
250
252
inactiveTextColor : grays . light ,
253
+ logoColor : colors . yellow ,
251
254
252
255
Button : {
253
256
primary : {
You can’t perform that action at this time.
0 commit comments