Basic style for PageLoader

This commit is contained in:
Melvin Valster
2019-07-27 13:33:07 +02:00
parent 016ed844e2
commit cfcaf996c2
3 changed files with 17 additions and 3 deletions
+5
View File
@@ -0,0 +1,5 @@
{
"search.exclude": {
"public/images": true
}
}
+9
View File
@@ -65,6 +65,15 @@ footer {
text-align: center; text-align: center;
} }
.page-loader {
display: flex;
height: 85vh;
flex-direction: column;
justify-content: center;
text-align: center;
animation: fadeIn 3s forwards;
}
#tooltip-root { #tooltip-root {
position: absolute; position: absolute;
z-index: $z-index-tooltips; z-index: $z-index-tooltips;
+3 -3
View File
@@ -5,11 +5,11 @@ export const PageLoader: FC<Props> = ({ isLoading, pastDelay, error, retry, time
const retryButton = <button onClick={retry}>retry</button> const retryButton = <button onClick={retry}>retry</button>
if (error) { if (error) {
return <div>Something went awry... do you wish to {retryButton}?</div> return <div className="page-loader">Something went awry... do you wish to {retryButton}?</div>
} else if (timedOut) { } else if (timedOut) {
return <div>Taking some time... {retryButton}?</div> return <div className="page-loader">Taking some time... {retryButton}?</div>
} else if (pastDelay) { } else if (pastDelay) {
return <div>Loading...</div> return <div className="page-loader">Loading...</div>
} else { } else {
return null return null
} }