Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mj12albert
Copy link
Member

@mj12albert mj12albert commented Dec 20, 2024

Fixes #1189

RTL horizontal scroll area demo: https://codesandbox.io/p/sandbox/eloquent-nightingale-s74566

@mui-bot
Copy link

mui-bot commented Dec 20, 2024

Netlify deploy preview

https://deploy-preview-1194--base-ui.netlify.app/

Generated by 🚫 dangerJS against 750577e

@mj12albert mj12albert marked this pull request as ready for review December 20, 2024 10:26
@@ -35,10 +38,10 @@ const ScrollAreaRoot = React.forwardRef(function ScrollAreaRoot(

const contextValue = React.useMemo(
() => ({
dir,
direction,
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ScrollArea] Does not read DirectionProvider for rtl
4 participants