-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add hasPrevPage
and hasNextPage
booleans
#29
Add hasPrevPage
and hasNextPage
booleans
#29
Conversation
}} | ||
onClick={() => prev()} | ||
disabled={!hasPrevPage} |
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.
👍
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.
LGTM -- thanks for sending this PR, appreciate it 👍
I'll publish a new release once I get a sec.
This is available in a pre-release https://github.com/richardscarrott/react-snap-carousel/releases/tag/v0.5.0-next.1 -- I'll run it in production for a little bit and then make it available as v0.5.0 proper. |
Now published as 0.5.0 https://github.com/richardscarrott/react-snap-carousel/releases/tag/v0.5.0 |
Thanks @richardscarrott! 🎉 Unrelated, have you considered adding support for autoplay? It’d be neat if ScreenRecording_09-21-2024.08-36-42_1.mov |
@jasongerbes I think that UI could be built relatively easily on top of what re: playing the video when an item becomes active, that could be done using |
This PR adds
hasPrevPage
andhasNextPage
booleans toSnapCarouselResult
to indicate if there's a previous or next page to scroll to.@richardscarrott, I have updated the
README.md
and Storybook components to use these new properties. You may also want to update the CodeSandbox example after this change has been released.Closes #28.