Skip to content

Commit

Permalink
Updated Loading animation for metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
guillecro committed Sep 14, 2023
1 parent 1ac1f00 commit aa8fd36
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 5 deletions.
20 changes: 19 additions & 1 deletion components/admin-metric/metricsByAuthor.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,24 @@ const LoadingAnimation = styled.div`
display: flex;
justify-content: center;
align-items: center;
background: #eaeaea;
padding: 20px 5px;
margin-bottom: 5px;
// animate text loading to fade in and out
p {
animation: fadeInOut 1.5s ease-in-out infinite;
}
@keyframes fadeInOut {
0% {
opacity: 0;
}
45% {
opacity: 1;
}
100% {
opacity: 0;
}
}
`

const UserWrapper = styled.div`
Expand Down Expand Up @@ -240,7 +258,7 @@ class MetricsByAuthor extends Component {
</FilterRow>
{ isLoading && (
<LoadingAnimation>
Cargando...
<p>Cargando...</p>
</LoadingAnimation>
)}
{ !isLoading && (<div>
Expand Down
20 changes: 19 additions & 1 deletion components/admin-metric/metricsInteractions.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,24 @@ const LoadingAnimation = styled.div`
display: flex;
justify-content: center;
align-items: center;
background: #eaeaea;
padding: 20px 5px;
margin-bottom: 5px;
// animate text loading to fade in and out
p {
animation: fadeInOut 1.5s ease-in-out infinite;
}
@keyframes fadeInOut {
0% {
opacity: 0;
}
45% {
opacity: 1;
}
100% {
opacity: 0;
}
}
`

const UserWrapper = styled.div`
Expand Down Expand Up @@ -367,7 +385,7 @@ class MetricsInteractions extends Component {
</FilterRow>
{ isLoading && (
<LoadingAnimation>
Cargando...
<p>Cargando...</p>
</LoadingAnimation>
)}
{ !isLoading && (<div>
Expand Down
20 changes: 19 additions & 1 deletion components/admin-metric/metricsTags.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,24 @@ const LoadingAnimation = styled.div`
display: flex;
justify-content: center;
align-items: center;
background: #eaeaea;
padding: 20px 5px;
margin-bottom: 5px;
// animate text loading to fade in and out
p {
animation: fadeInOut 1.5s ease-in-out infinite;
}
@keyframes fadeInOut {
0% {
opacity: 0;
}
45% {
opacity: 1;
}
100% {
opacity: 0;
}
}
`

const UserWrapper = styled.div`
Expand Down Expand Up @@ -404,7 +422,7 @@ class MetricsTags extends Component {
</FilterRow> */}
{ isLoading && (
<LoadingAnimation>
Cargando...
<p>Cargando...</p>
</LoadingAnimation>
)}
{ !isLoading && (<div>
Expand Down
20 changes: 19 additions & 1 deletion components/admin-metric/metricsUsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,24 @@ const LoadingAnimation = styled.div`
display: flex;
justify-content: center;
align-items: center;
background: #eaeaea;
padding: 20px 5px;
margin-bottom: 5px;
// animate text loading to fade in and out
p {
animation: fadeInOut 1.5s ease-in-out infinite;
}
@keyframes fadeInOut {
0% {
opacity: 0;
}
45% {
opacity: 1;
}
100% {
opacity: 0;
}
}
`

const UserWrapper = styled.div`
Expand Down Expand Up @@ -259,7 +277,7 @@ class MetricsUsers extends Component {
</FilterRow>
{ isLoading && (
<LoadingAnimation>
Cargando...
<p>Cargando...</p>
</LoadingAnimation>
)}
{ !isLoading && (
Expand Down
20 changes: 19 additions & 1 deletion components/admin-metric/metricsUsersByRole.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,24 @@ const LoadingAnimation = styled.div`
display: flex;
justify-content: center;
align-items: center;
background: #eaeaea;
padding: 20px 5px;
margin-bottom: 5px;
// animate text loading to fade in and out
p {
animation: fadeInOut 1.5s ease-in-out infinite;
}
@keyframes fadeInOut {
0% {
opacity: 0;
}
45% {
opacity: 1;
}
100% {
opacity: 0;
}
}
`

const UserWrapper = styled.div`
Expand Down Expand Up @@ -235,7 +253,7 @@ class MetricsUsersByRole extends Component {
</TitleMetric>
{ isLoading && (
<LoadingAnimation>
Cargando...
<p>Cargando...</p>
</LoadingAnimation>
)}
{ !isLoading && (<div>
Expand Down

0 comments on commit aa8fd36

Please sign in to comment.