-
-
Notifications
You must be signed in to change notification settings - Fork 88
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
[ScrollArea] Read DirectionProvider
and use logical positioning CSS props
#1194
Conversation
Netlify deploy preview |
264ae0b
to
4a754f5
Compare
4a754f5
to
750577e
Compare
@@ -35,10 +38,10 @@ const ScrollAreaRoot = React.forwardRef(function ScrollAreaRoot( | |||
|
|||
const contextValue = React.useMemo( | |||
() => ({ | |||
dir, | |||
direction, |
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.
I am curious, what's the benefit of adding the direction in a context, when each subcomponent that need it can read the DirectionProvider's context?
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.
what's the benefit of adding the direction in a context
It doesn't need to be in the root context anymore, I've updated this ~
Fixes #1189
RTL horizontal scroll area demo: https://codesandbox.io/p/sandbox/eloquent-nightingale-s74566