-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #155 from bartolomej/error_handling_loading
Improved error handling & loading
- Loading branch information
Showing
9 changed files
with
6,646 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import React from "react"; | ||
import styled from "@emotion/styled"; | ||
|
||
// https://gist.github.com/knowbody/578b35164b69e867ed4913423f6bed30 | ||
export const Spinner = () => ( | ||
<Svg viewBox="0 0 50 50"> | ||
<circle | ||
className="path" | ||
cx="25" | ||
cy="25" | ||
r="20" | ||
fill="none" | ||
strokeWidth="4" | ||
/> | ||
</Svg> | ||
); | ||
|
||
const Svg = styled.svg` | ||
animation: rotate 2s linear infinite; | ||
margin: -25px 0 0 -25px; | ||
width: 50px; | ||
height: 50px; | ||
& .path { | ||
stroke: ${(props) => props.theme.colors.primary}; | ||
stroke-linecap: round; | ||
animation: dash 1.5s ease-in-out infinite; | ||
} | ||
@keyframes rotate { | ||
100% { | ||
transform: rotate(360deg); | ||
} | ||
} | ||
@keyframes dash { | ||
0% { | ||
stroke-dasharray: 1, 150; | ||
stroke-dashoffset: 0; | ||
} | ||
50% { | ||
stroke-dasharray: 90, 150; | ||
stroke-dashoffset: -35; | ||
} | ||
100% { | ||
stroke-dasharray: 90, 150; | ||
stroke-dashoffset: -124; | ||
} | ||
} | ||
`; |
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
Oops, something went wrong.