-
Notifications
You must be signed in to change notification settings - Fork 16
feat: add HorizontalScrollContainer component #469
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
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@thebeyondr I created this for my gateway fees dashboard but added it as seperate pull request as it will also help your work on the voting transparency feature. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a new reusable HorizontalScrollContainer component designed to improve horizontal scrolling behavior on mobile devices. The component includes a visual gradient indicator when content overflows and can be scrolled.
- Introduces a new component with overflow detection and smooth scrolling behavior
- Replaces inline Box styling with the reusable component in the account layout
- Implements dynamic gradient indicator that appears/disappears based on scroll position
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| components/HorizontalScrollContainer/index.tsx | New component implementing horizontal scroll container with overflow detection via ResizeObserver and scroll events, gradient fade indicator, and ref forwarding |
| layouts/account.tsx | Refactors account tabs to use the new HorizontalScrollContainer component, replacing the previous inline Box implementation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
b064290 to
9420c95
Compare
Adds a reusable component that improves horizontal scrolling behavior on mobile devices.
9420c95 to
371a69c
Compare
Make scrollbuffer a constant to improve code readability. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com
Ensure that the container scrolls to the active page when clicked.
Recalculate overflow effects when child elements change to ensure consistent fading. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
6cc6424 to
90e78e5
Compare
Adds a reusable component that improves horizontal scrolling behavior
on mobile devices.