feat(frontend): improve loading spinner

This commit is contained in:
Julian Tölle 2020-06-05 01:21:27 +02:00
parent 5f8eacae7b
commit 42e8b886a0
6 changed files with 47 additions and 1 deletions

View file

@ -78,7 +78,7 @@ export const ReportListens: React.FC = () => {
</div>
{isLoading && (
<div>
<span>Loading Listens</span>
<div className="loader rounded-full border-8 h-64 w-64"></div>
</div>
)}
{report.length === 0 && (

23
frontend/src/loader.css Normal file
View file

@ -0,0 +1,23 @@
.loader {
border-top-color: theme("colors.green.500");
-webkit-animation: spinner 1.5s linear infinite;
animation: spinner 1.5s linear infinite;
}
@-webkit-keyframes spinner {
0% {
-webkit-transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
}
}
@keyframes spinner {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}

View file

@ -1,3 +1,5 @@
@import "loader.css";
@tailwind base;
@tailwind components;