2
0

💄 Fix router progress bar color for dark mode

This commit is contained in:
Baptiste Arnaud
2022-12-22 12:00:58 +01:00
parent c3985b0d50
commit e55823e011
2 changed files with 8 additions and 49 deletions

View File

@ -4,7 +4,7 @@
} }
#nprogress .bar { #nprogress .bar {
background: #0042da; background: var(--chakra-colors-blue-500);
position: fixed; position: fixed;
z-index: 1031; z-index: 1031;
@ -22,7 +22,8 @@
right: 0px; right: 0px;
width: 100px; width: 100px;
height: 100%; height: 100%;
box-shadow: 0 0 10px #0042da, 0 0 5px #0042da; box-shadow: 0 0 10px var(--chakra-colors-blue-500),
0 0 5px var(--chakra-colors-blue-500);
opacity: 1; opacity: 1;
-webkit-transform: rotate(3deg) translate(0px, -4px); -webkit-transform: rotate(3deg) translate(0px, -4px);
@ -30,52 +31,10 @@
transform: rotate(3deg) translate(0px, -4px); transform: rotate(3deg) translate(0px, -4px);
} }
/* Remove these to get rid of the spinner */ .chakra-ui-dark #nprogress .bar {
#nprogress .spinner { background: var(--chakra-colors-blue-300);
display: block;
position: fixed;
z-index: 1031;
top: 15px;
right: 15px;
} }
#nprogress .spinner-icon { .chakra-ui-dark #nprogress .peg {
width: 18px; background: var(--chakra-colors-blue-300);
height: 18px;
box-sizing: border-box;
border: solid 2px transparent;
border-top-color: #0042da;
border-left-color: #0042da;
border-radius: 50%;
-webkit-animation: nprogress-spinner 400ms linear infinite;
animation: nprogress-spinner 400ms linear infinite;
}
.nprogress-custom-parent {
overflow: hidden;
position: relative;
}
.nprogress-custom-parent #nprogress .spinner,
.nprogress-custom-parent #nprogress .bar {
position: absolute;
}
@-webkit-keyframes nprogress-spinner {
0% {
-webkit-transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
}
}
@keyframes nprogress-spinner {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
} }

View File

@ -41,7 +41,7 @@ const App = ({
position: 'bottom-right', position: 'bottom-right',
status: 'success', status: 'success',
title: 'Upgrade success!', title: 'Upgrade success!',
description: `Workspace upgraded to ${toTitleCase(status)} 🎉`, description: `Workspace upgraded to ${toTitleCase(newPlan)} 🎉`,
}) })
// eslint-disable-next-line react-hooks/exhaustive-deps // eslint-disable-next-line react-hooks/exhaustive-deps
}, [isReady]) }, [isReady])