This repository has been archived by the owner on Nov 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
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
Showing
27 changed files
with
835 additions
and
140 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import React from 'react'; | ||
import styled, { keyframes } from 'styled-components'; | ||
|
||
const boom = keyframes` | ||
0% { | ||
transform: rotate(45deg) scale(1); | ||
} | ||
20% { | ||
transform: rotate(45deg) scale(1.1); | ||
} | ||
40% { | ||
transform: rotate(45deg) scale(1); | ||
} | ||
60% { | ||
transform: rotate(45deg) scale(1.2); | ||
} | ||
100% { | ||
transform: rotate(45deg) scale(1); | ||
} | ||
`; | ||
|
||
|
||
const LoadContainer = styled.div` | ||
width: 50px; | ||
height: 50px; | ||
position: relative; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
/* overflow: hidden; */ | ||
`; | ||
|
||
const Heart = styled.div` | ||
width: ${props => props.size === 'small' ? 22 : (props.size === 'large' ? 30 : 26)}px; | ||
height: ${props => props.size === 'small' ? 22 : (props.size === 'large' ? 30 : 26)}px; | ||
background-color: ${props => props.color || '#00adb5'}; | ||
position: relative; | ||
transform: rotate(45deg); | ||
animation: ${boom} ${props => props.speed || 2}s ease infinite; | ||
&::before { | ||
content: ''; | ||
width: 100%; | ||
height: 100%; | ||
border-radius: 50%; | ||
background-color: ${props => props.color || '#00adb5'}; | ||
position: absolute; | ||
left: -50%; | ||
bottom: 0; | ||
} | ||
&::after { | ||
content: ''; | ||
width: 100%; | ||
height: 100%; | ||
border-radius: 50%; | ||
background-color: ${props => props.color || '#00adb5'}; | ||
position: absolute; | ||
top: -50%; | ||
right: 0; | ||
} | ||
` | ||
|
||
const HeartBoomLoading = ({ style, color, speed, size }) => { | ||
return ( | ||
<LoadContainer style={style}> | ||
<Heart color={color} speed={speed} size={size}/> | ||
</LoadContainer> | ||
); | ||
}; | ||
|
||
export default HeartBoomLoading; |
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,153 @@ | ||
import React from 'react'; | ||
import styled, { keyframes } from 'styled-components'; | ||
|
||
const leftLadderMove = keyframes` | ||
0% { | ||
transform: translateY(68px); | ||
} | ||
10%, | ||
50% { | ||
transform: translateY(0); | ||
} | ||
60%, | ||
100% { | ||
transform: translateY(-68px); | ||
} | ||
`; | ||
|
||
const rightLadderMove = keyframes` | ||
0%, | ||
40% { | ||
transform: translateY(68px); | ||
} | ||
50%, | ||
90% { | ||
transform: translateY(0); | ||
} | ||
100% { | ||
transform: translateY(-68px); | ||
} | ||
`; | ||
|
||
const RowLadderOneMove = keyframes` | ||
0%, | ||
10% { | ||
transform: translateY(68px); | ||
} | ||
20%, | ||
60% { | ||
transform: translateY(0); | ||
} | ||
70%, | ||
100% { | ||
transform: translateY(-68px); | ||
} | ||
`; | ||
|
||
const RowLadderTwoMove = keyframes` | ||
0%, | ||
20% { | ||
transform: translateY(68px); | ||
} | ||
30%, | ||
70% { | ||
transform: translateY(0); | ||
} | ||
80%, | ||
100% { | ||
transform: translateY(-68px); | ||
} | ||
`; | ||
|
||
const RowLadderThreeMove = keyframes` | ||
0%, | ||
30% { | ||
transform: translateY(68px); | ||
} | ||
40%, | ||
80% { | ||
transform: translateY(0); | ||
} | ||
90%, | ||
100% { | ||
transform: translateY(-68px); | ||
} | ||
`; | ||
|
||
const LoadContainer = styled.div` | ||
width: ${props => props.size === 'small' ? 16 : (props.size === 'large' ? 24 : 20)}px; | ||
height: ${props => props.size === 'small' ? 60 : (props.size === 'large' ? 68 : 64)}px; | ||
position: relative; | ||
overflow: hidden; | ||
`; | ||
|
||
const LeftLadder = styled.div` | ||
height: 0; | ||
width: 1px; | ||
border-bottom: ${props => props.size === 'small' ? 60 : (props.size === 'large' ? 68 : 64)}px solid ${props => props.color || '#00adb5'}; | ||
border-left: 1px solid transparent; | ||
border-right: 1px solid transparent; | ||
position: absolute; | ||
left: 0; | ||
bottom: 0; | ||
animation: ${leftLadderMove} ${props => props.speed || 4}s ease infinite; | ||
`; | ||
|
||
const RightLadder = styled.div` | ||
height: 0; | ||
width: 1px; | ||
border-bottom: ${props => props.size === 'small' ? 60 : (props.size === 'large' ? 68 : 64)}px solid ${props => props.color || '#00adb5'}; | ||
border-left: 1px solid transparent; | ||
border-right: 1px solid transparent; | ||
position: absolute; | ||
right: 0; | ||
bottom: 0; | ||
animation: ${rightLadderMove} ${props => props.speed || 4}s ease infinite; | ||
`; | ||
|
||
const RowLadderOne = styled.div` | ||
height: 1px; | ||
width: 18px; | ||
background-color: ${props => props.color || '#00adb5'}; | ||
position: absolute; | ||
left: 50%; | ||
margin-left: -9px; | ||
top: 10px; | ||
animation: ${RowLadderOneMove} ${props => props.speed || 4}s ease infinite; | ||
` | ||
|
||
const RowLadderTwo = styled.div` | ||
height: 1px; | ||
width: 18px; | ||
background-color: ${props => props.color || '#00adb5'}; | ||
position: absolute; | ||
left: 50%; | ||
margin-left: -9px; | ||
top: 30px; | ||
animation: ${RowLadderTwoMove} ${props => props.speed || 4}s ease infinite; | ||
` | ||
|
||
const RowLadderThree = styled.div` | ||
height: 1px; | ||
width: 18px; | ||
background-color: ${props => props.color || '#00adb5'}; | ||
position: absolute; | ||
left: 50%; | ||
margin-left: -9px; | ||
top: 50px; | ||
animation: ${RowLadderThreeMove} ${props => props.speed || 4}s ease infinite; | ||
` | ||
|
||
const LadderLoading = ({ style, color, speed, size }) => { | ||
return ( | ||
<LoadContainer style={style}> | ||
<LeftLadder color={color} speed={speed} size={size}/> | ||
<RightLadder color={color} speed={speed} size={size}/> | ||
<RowLadderOne color={color} speed={speed} size={size}/> | ||
<RowLadderTwo color={color} speed={speed} size={size}/> | ||
<RowLadderThree color={color} speed={speed} size={size}/> | ||
</LoadContainer> | ||
); | ||
}; | ||
|
||
export default LadderLoading; |
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.