-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Not used prop and better declaration of currentTeamMember Minor feature: Since there is a delay in the response of the API, a simple loading componentt is added
- Loading branch information
Federico Madoery
committed
Jan 2, 2019
1 parent
4d639c6
commit 40ac08f
Showing
4 changed files
with
100 additions
and
20 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,34 @@ | ||
import React, { Component } from 'react'; | ||
import styled, { keyframes } from 'styled-components'; | ||
|
||
const BounceAnimation = keyframes` | ||
0% { margin-bottom: 0; } | ||
50% { margin-bottom: 5px } | ||
100% { margin-bottom: 0 } | ||
`; | ||
const DotWrapper = styled.div` | ||
display: flex; | ||
align-items: flex-end; | ||
`; | ||
const Dot = styled.div` | ||
background-color: rgb(46,73,122); | ||
border-radius: 50%; | ||
width: 4px; | ||
height: 4px; | ||
margin: 0 3px; | ||
/* Animation */ | ||
animation: ${BounceAnimation} 0.5s linear infinite; | ||
animation-delay: ${props => props.delay}; | ||
`; | ||
|
||
export default class LoadingDots extends Component { | ||
render() { | ||
return ( | ||
<DotWrapper> | ||
<Dot delay='0s' /> | ||
<Dot delay='.1s' /> | ||
<Dot delay='.2s' /> | ||
</DotWrapper> | ||
) | ||
} | ||
} |
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