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

[docs] Provide an alternative to right-to-left #25584

Merged
merged 1 commit into from
Apr 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/src/pages/guides/right-to-left/right-to-left.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@ Make sure the `dir` attribute is set on the body, otherwise native components wi
<body dir="rtl"></body>
```

As an alternative to the above, you can also wrap your application in an element with the `dir` attribute:

```jsx
function App() {
return (
<div dir="rtl">
<MyComponent />
</div>
);
}
```

This can be helpful for creating components to toggle language settings in the live application.

### 2. Theme

Set the direction in your custom theme:
Expand Down