-
Notifications
You must be signed in to change notification settings - Fork 734
Slider - Increased hit target #3531
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
Conversation
@@ -28,14 +28,21 @@ interface ThumbProps extends ViewProps { | |||
|
|||
const SHADOW_RADIUS = 4; | |||
const THUMB_SIZE = 24; | |||
const THUMB_ACCESSIBLE_HITSLOP = Math.max(0, 48 - THUMB_SIZE) / 2; |
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.
As we discussed before, hitSlop
can be Rect or number
.
Since all the values are the same let's pass the THUMB_ACCESSIBLE_HITSLOP
number as default.
Please check it and confirm.
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.
The thumb is view and not a pressable. For some reason view's hit slop doesn't receive number :/
https://reactnative.dev/docs/0.73/view#hitslop
@nitzanyiz Approved as we discussed about it. |
@@ -28,14 +28,21 @@ interface ThumbProps extends ViewProps { | |||
|
|||
const SHADOW_RADIUS = 4; | |||
const THUMB_SIZE = 24; | |||
const THUMB_ACCESSIBLE_HITSLOP = Math.max(0, 48 - THUMB_SIZE) / 2; | |||
const DEFAULT_THUMB_HIT_SLOP = { |
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.
You don't need the DEFAULT_THUMB_HIT_SLOP. If all sides are equal you can pass one value - THUMB_ACCESSIBLE_HITSLOP
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.
Description
Added accessible hitSlop to the slider thumb.
Changelog
Incubator.Slider - Increased thumb hitSlop.
Additional info
MADS-4591