Skip to content

Commit

Permalink
fix broken link and Dialog reference in Joy
Browse files Browse the repository at this point in the history
  • Loading branch information
danilo-leal committed Oct 19, 2023
1 parent 16f21ba commit a809a62
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/data/joy/customization/right-to-left/right-to-left.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ document.dir = 'rtl';
Add the `dir="rtl"` attribute to any other HTML element or React component if you need limit the scope of the text direction to that element and its children.

:::warning
Components that use React portals (like the [Dialog](/joy-ui/react-dialog/)) do _not_ inherit the `dir` attribute from parents, because they actually render outside of their parental DOM trees.
Components that use React portals (like the [Modal](/joy-ui/react-modal/)) do _not_ inherit the `dir` attribute from parents, because they actually render outside of their parental DOM trees.

You must apply the `dir` attribute directly to these components if it's not [globally](#globally) defined as right-to-left:

```jsx
<Box dir="rtl">
<Dialog /> // ❌ this Dialog will still be left-to-right (the default)
<Modal /> // ❌ this Modal will still be left-to-right (the default)
</Box>
<Box dir="rtl">
<Dialog dir="rtl" /> // ✅ this Dialog will be right-to-left as intended
<Modal dir="rtl" /> // ✅ this Modal will be right-to-left as intended
</Box>
```

Expand Down

0 comments on commit a809a62

Please sign in to comment.