Skip to content

Commit

Permalink
[docs] Provide an alternative to right-to-left (#25584)
Browse files Browse the repository at this point in the history
  • Loading branch information
dariusk committed Apr 2, 2021
1 parent e157cb4 commit 3f9b3d1
Showing 1 changed file with 14 additions and 0 deletions.
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

0 comments on commit 3f9b3d1

Please sign in to comment.