Skip to content

Commit 2bf4b60

Browse files
docs: fix small typos in ViewStyle, ViewToken, Text docs (facebook#4237)
1 parent af0a5ab commit 2bf4b60

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

docs/text.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export default TextInANest;
5656

5757
## Nested text
5858

59-
Both Android and iOS allow you to display formatted text by annotating ranges of a string with specific formatting like bold or colored text (`NSAttributedString` on iOS, `SpannableString` on Android). In practice, this is very tedious. For React Native, we decided to use web paradigm for this where you can nest text to achieve the same effect.
59+
Both Android and iOS allow you to display formatted text by annotating ranges of a string with specific formatting like bold or colored text (`NSAttributedString` on iOS, `SpannableString` on Android). In practice, this is very tedious. For React Native, we decided to use the web paradigm for this, where you can nest text to achieve the same effect.
6060

6161
```SnackPlayer name=Nested%20Text%20Example
6262
import React from 'react';
@@ -106,7 +106,7 @@ The `<Text>` element is unique relative to layout: everything inside is no longe
106106
<Text>First part and </Text>
107107
<Text>second part</Text>
108108
</Text>
109-
// Text container: the text will be inline if the space allowed it
109+
// Text container: the text will be inline, if the space allows it
110110
// |First part and second part|
111111

112112
// otherwise, the text will flow as if it was one
@@ -181,7 +181,7 @@ const MyAppHeaderText = ({children}) => {
181181
};
182182
```
183183

184-
Composing `MyAppText` in this way ensures that we get the styles from a top-level component, but leaves us the ability to add / override them in specific use cases.
184+
Composing `MyAppText` in this way ensures that we get the styles from a top-level component, but leaves us the ability to add/override them in specific use cases.
185185

186186
React Native still has the concept of style inheritance, but limited to text subtrees. In this case, the second part will be both bold and red.
187187

@@ -254,7 +254,7 @@ On Android, these roles have similar functionality on TalkBack as adding Accessi
254254

255255
Tells the screen reader to treat the currently focused on element as being in a specific state.
256256

257-
You can provide one state, no state, or multiple states. The states must be passed in through an object. Ex: `{selected: true, disabled: true}`.
257+
You can provide one state, no state, or multiple states. The states must be passed in through an object, e.g. `{selected: true, disabled: true}`.
258258

259259
| Type |
260260
| ------------------------------------------------------ |

docs/view-style-props.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,6 @@ Controls whether the `View` can be the target of touch events.
324324
- `'box-none'`: The View is never the target of touch events but its subviews can be.
325325
- `'box-only'`: The view can be the target of touch events but its subviews cannot be.
326326

327-
| Type |
328-
| --------------------------------------------- |
329-
| enum('auto', 'box-none', 'box-only', 'none' ) |
327+
| Type |
328+
| ----------------------------------------------------- |
329+
| enum(`'auto'`, `'box-none'`, `'box-only'`, `'none'` ) |

docs/viewtoken.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ id: viewtoken
33
title: ViewToken Object Type
44
---
55

6-
`ViewToken` object is returned as one of properties in the `onViewableItemsChanged` callback, for example in [FlatList](flatlist) component. It is exported by [`ViewabilityHelper.js`](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Lists/ViewabilityHelper.js).
6+
`ViewToken` object is returned as one of the properties in the `onViewableItemsChanged` callback (for example, in the [FlatList](flatlist) component). It is exported by [`ViewabilityHelper.js`](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Lists/ViewabilityHelper.js).
77

88
## Example
99

@@ -44,7 +44,7 @@ Item data
4444

4545
### `key`
4646

47-
Key identifier assigned of the data element extracted to the top level.
47+
Key identifier assigned to the data element extracted to the top level.
4848

4949
| Type | Optional |
5050
| ------ | -------- |

0 commit comments

Comments
 (0)