This commit is contained in:
Mosaad 2023-02-23 01:30:00 +02:00
parent e1aa69ac89
commit 53ecf623c4
2 changed files with 4 additions and 6 deletions

View file

@ -25,7 +25,7 @@ function useScrollPosition() {
export default function BackToTop() {
const percent = useScrollPosition();
return (
<a className="BackToTopLink" href="#top" title="Back To Top" percent={percent}>
<a className={`BackToTopLink ${percent > 0.25 ? 'Show' : ''}`} href="#top" title="Back To Top">
&uarr;
</a>
);

View file

@ -245,7 +245,6 @@ body::-webkit-scrollbar-thumb {
position: fixed;
bottom: 1%;
right: 1%;
background: var(--pink);
color: white;
background: rgba(0, 0, 0, 0.5);
cursor: pointer;
@ -255,11 +254,10 @@ body::-webkit-scrollbar-thumb {
opacity: 0;
text-decoration: none;
/* ${props =>
props.percent > 0.25 &&
`
&.Show {
opacity: 1;
`} */
}
@media screen and (max-width: 500px) {
display: none;
}