-
Notifications
You must be signed in to change notification settings - Fork 6.1k
docs: Clearify swapLeftAndRightInRTL functionality #4826
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -117,6 +117,12 @@ static doLeftAndRightSwapInRTL: boolean; | |
|
|
||
| A boolean value indicating whether left and right style properties should be automatically swapped when in RTL mode. When enabled, left becomes right and right becomes left in RTL layouts. | ||
|
|
||
| **Important Notes:** | ||
|
|
||
| - doLeftAndRightSwapInRTL is `true` by default. This can be set to `false` with `swapLeftAndRightinRTL()`. | ||
| - Does only affect `marginLeft` / `marginRight` / `paddingLeft` / `paddingRight` / `borderLeftWidth` / `borderRightWidth` | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you provide a code reference for this enumeration? Are you sure that's those are the only affected style props? |
||
| - Does not affect position (relative/absolute) `left` / `right` | ||
|
|
||
| ## Methods | ||
|
|
||
| ### `allowRTL()` | ||
|
|
@@ -162,4 +168,4 @@ Avoid forcing RTL in production apps as it requires a full app restart to take e | |
| static swapLeftAndRightInRTL: (swapLeftAndRight: boolean) => void; | ||
| ``` | ||
|
|
||
| Swap left and right style properties in RTL mode. When enabled, left becomes right and right becomes left in RTL layouts. Does not affect the value of `isRTL`. | ||
| Swap left and right style properties in RTL mode. When enabled, left becomes right and right becomes left in RTL layouts. Does not affect the value of `isRTL`. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this change seems to just be an unnecessary space at the end?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you, you are correct, I will remove it. |
||
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.
It is quite implicit from the sentence above that swap is enabled by default. I think we can skip that point, or just alter the sentence above.