Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improving scroll to top button elegent and clean design #3637

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions components/buttons/ScrollButton.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Image from 'next/image';
import React, { useEffect, useState } from 'react';

/**
Expand Down Expand Up @@ -26,13 +27,10 @@ function ScrollButton() {
};

return (
<div className='fixed bottom-14 right-4 z-40 h-16 w-12'>
<div className='fixed flex z-40 bottom-6 right-6 m-0 w-12'>
{backToTopButton && (
<button
className='rounded-full bg-white shadow-md transition-all duration-300 ease-in-out hover:scale-110 hover:bg-[#8851FB]'
onClick={scrollUp}
>
<img src={scrollImage} alt='scroll to top' />
<button className='rounded-full border border-black/25 bg-white shadow-darkGunMetal' onClick={scrollUp}>
<Image src={scrollImage} alt='scroll to top' width={120} height={120} />
</button>
)}
</div>
Expand Down
30 changes: 16 additions & 14 deletions public/img/loaders/scroll.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading