-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Scrollable: Convert component to TypeScript #42016
Conversation
Size Change: 0 B Total Size: 1.25 MB ℹ️ View Unchanged
|
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.
Left a couple of comments, but otherwise changes LGTM 🚀
Feel free to merge once the comments are addressed
right: | ||
otherProps.scrollDirection === 'y' ? 'initial' : 0, | ||
bottom: args.scrollDirection === 'x' ? 'initial' : 0, | ||
right: 0, |
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.
Is this changes on purpose? Previously, the right
attribute could also have a value of initial
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.
Yes the change was intended. In my testing the out of view element was outside the scrollable area. Setting right: 0
made scrollDirection
work with all both x
, y
and auto
.
30f2c74
to
023d66d
Compare
What?
Converts the
Scrollable
component to TypeScript.Why?
Part of the @wordpress/components's TypeScript migration (#35744).
How?
Scrollable
to TypeScript.Testing Instructions
Scrollable
continues to function as expected