-
Notifications
You must be signed in to change notification settings - Fork 613
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
Added new onSwipe callbacks #248
Added new onSwipe callbacks #248
Conversation
@Purii thank you for the PR!
Would it make sense doing something like this (just asking for feedback, I'm not saying you should do it in the PR 😃)?
What do you think? |
I'm also not that happy with the naming. |
@Purii thank you sir 🙇 |
@mmazzarolo You're welcome! Deprecation Added Prettier Config Let me know if I should change something :) |
Any idea for a better naming of |
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.
Any idea for a better naming of
percentageLeft
as value ofonSwipeMove
swipeProgress
maybe? Did you check if it is invoked correctly? (Can't check it right now).
Look good to me, top notch contribution 👌
No worries about the prettier config, we are planning to start using a community
driven one so it probably be changed again soon.
console.warn( | ||
'`<Modal onSwipe="..." />` is deprecated. Use `<Modal onSwipeComplete="..." />` instead.', | ||
); | ||
} |
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.
❤️
} | ||
if (this.props.scrollTo && this.props.scrollOffset > 0) { | ||
return false; // user needs to be able to scroll content back up | ||
} |
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.
Thanks for the cleanup
Yep. Will be invoked on each move. No throttling, as I would leave that responsibility to the user. |
🤦♂️ my bad, you're right. |
Renamed it to |
Is the prettier config fine for you? |
Yes, see:
Merging, thanks @Purii ! |
Landed in v8.0.0-beta.1 🛬 |
Great component!
I needed a method to get notified, once the user started swiping the modal:
Modal from bottom containing an arrow icon. The icon shall be animated based on the swiping state.
Feel free to provide improvements 👍