Skip to content

Commit 550afdc

Browse files
committed
Update documentation to match API changes
1 parent 47671ca commit 550afdc

File tree

10 files changed

+157
-237
lines changed

10 files changed

+157
-237
lines changed

packages/react-native-web-docs/src/pages/docs/apis/style-sheet.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ permalink: /docs/style-sheet/index.html
55
eleventyNavigation:
66
key: StyleSheet
77
parent: APIs
8-
label: "Change"
98
---
109

1110
{% import "fragments/macros.html" as macro with context %}

packages/react-native-web-docs/src/pages/docs/appendix/unstable-apis.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ eleventyNavigation:
77
key: Unstable APIs
88
parent: Appendix
99
order: 1
10-
label: "Change"
1110
---
1211

1312
:::lead

packages/react-native-web-docs/src/pages/docs/components/text-input.md

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ permalink: /docs/text-input/index.html
55
eleventyNavigation:
66
key: TextInput
77
parent: Components
8+
label: "Change"
89
---
910

1011
{% import "fragments/macros.html" as macro with context %}
@@ -31,12 +32,16 @@ import { TextInput } from 'react-native-web';
3132
The [accessibility props]({{ '/docs/accessibility' | url }}).
3233
{% endcall %}
3334

34-
{% call macro.prop('...ClickProps') %}
35-
The [click props]({{ '/docs/interactions' | url }}).
35+
{% call macro.prop('...PointerProps') %}
36+
The [PointerEvent props]({{ '/docs/interactions' | url }}).
3637
{% endcall %}
3738

3839
{% call macro.prop('...FocusProps') %}
39-
The [focus props]({{ '/docs/interactions' | url }}).
40+
The [FocusEvent props]({{ '/docs/interactions' | url }}).
41+
{% endcall %}
42+
43+
{% call macro.prop('...KeyboardProps') %}
44+
The [KeyboardEvent props]({{ '/docs/interactions' | url }}).
4045
{% endcall %}
4146

4247
{% call macro.prop('autoCapitalize', '?string') %}
@@ -79,11 +84,15 @@ Equivalent to [HTMLElement.dir](https://developer.mozilla.org/en-US/docs/Web/API
7984
Equivalent to [HTMLElement.disabled](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled)
8085
{% endcall %}
8186

82-
{% call macro.prop('editable', '?boolean = true') %}
83-
Equivalent to [HTMLElement.readonly](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly)
87+
{% call macro.prop('enterKeyHint', '?string') %}
88+
Specifies what action label (or icon) to present for the enter key on virtual keyboards. Equivalent to [HTMLElement.enterkeyhint](https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-enterkeyhint-attribute)
89+
{% endcall %}
90+
91+
{% call macro.prop('id', '?string') %}
92+
Equivalent to [HTMLElement.id](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id).
8493
{% endcall %}
8594

86-
{% call macro.prop('keyboardType', '?string') %}
95+
{% call macro.prop('inputMode', '?string') %}
8796
Hints at the type of data that might be entered by the user while editing the element or its contents. Equivalent to [HTMLElement.inputMode](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode). Safari iOS requires an ancestral `<form action>` element to display the search keyboard. (Not available when multiline is true.)
8897
{% endcall %}
8998

@@ -99,14 +108,6 @@ Equivalent to [HTMLElement.maxlength](https://developer.mozilla.org/en-US/docs/W
99108
If `true`, the text input can be multiple lines.
100109
{% endcall %}
101110

102-
{% call macro.prop('nativeID', '?string') %}
103-
Equivalent to [HTMLElement.id](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id).
104-
{% endcall %}
105-
106-
{% call macro.prop('numberOfLines', '?number = 1') %}
107-
Sets the number of lines for a multiline input. (Requires `multiline` to be `true`.)
108-
{% endcall %}
109-
110111
{% call macro.prop('onChange', '?(e: ChangeEvent) => void') %}
111112
Equivalent to the React DOM `ChangeEvent`.
112113
{% endcall %}
@@ -139,7 +140,6 @@ Callback that is called when the text input's selection changes.
139140
Callback that is called when the keyboard's submit button is pressed. When `multiline={true}`, this is only called if `blurOnSubmit={true}`.
140141
{% endcall %}
141142

142-
143143
{% call macro.prop('placeholder', '?boolean') %}
144144
Text that appears in the form control when it has no value set.
145145
{% endcall %}
@@ -148,8 +148,12 @@ Text that appears in the form control when it has no value set.
148148
Equivalent to defining `::placeholder { color }` via a CSS property.
149149
{% endcall %}
150150

151-
{% call macro.prop('returnKeyType', '?string') %}
152-
Specifies what action label (or icon) to present for the enter key on virtual keyboards. Equivalent to [HTMLElement.enterkeyhint](https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-enterkeyhint-attribute)
151+
{% call macro.prop('readOnly', '?boolean = false') %}
152+
Equivalent to [HTMLElement.readonly](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly)
153+
{% endcall %}
154+
155+
{% call macro.prop('rows', '?number = 1') %}
156+
Sets the number of lines for a multiline input. (Requires `multiline` to be `true`.)
153157
{% endcall %}
154158

155159
{% call macro.prop('secureTextEntry', '?boolean = false') %}

packages/react-native-web-docs/src/pages/docs/components/text.md

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ permalink: /docs/text/index.html
55
eleventyNavigation:
66
key: Text
77
parent: Components
8+
label: "Change"
89
---
910

1011
{% import "fragments/macros.html" as macro with context %}
@@ -21,7 +22,7 @@ import { Text } from 'react-native';
2122
<Text {...props}>{children}</Text>;
2223
```
2324

24-
::: callout
25+
::: callout
2526
**Did you know?** Text styling in {{ site.name }} has stricter rules than it does on the web. Read the [Styling]({{ '/docs/styling' | url }}) guide to learn more.
2627
:::
2728

@@ -35,20 +36,20 @@ import { Text } from 'react-native';
3536
The [accessibility props]({{ '/docs/accessibility' | url }}).
3637
{% endcall %}
3738

38-
{% call macro.prop('...ClickProps') %}
39-
The [click props]({{ '/docs/interactions' | url }}).
39+
{% call macro.prop('...PointerProps') %}
40+
The [PointerEvent props]({{ '/docs/interactions' | url }}).
4041
{% endcall %}
4142

4243
{% call macro.prop('...FocusProps') %}
43-
The [focus props]({{ '/docs/interactions' | url }}).
44+
The [FocusEvent props]({{ '/docs/interactions' | url }}).
4445
{% endcall %}
4546

4647
{% call macro.prop('...KeyboardProps') %}
47-
The [keyboard props]({{ '/docs/interactions' | url }}).
48+
The [KeyboardEvent props]({{ '/docs/interactions' | url }}).
4849
{% endcall %}
4950

5051
{% call macro.prop('...ResponderProps') %}
51-
The [responder props]({{ '/docs/interactions' | url }}).
52+
The [ResponderEvent props]({{ '/docs/interactions' | url }}).
5253
{% endcall %}
5354

5455
{% call macro.prop('children', 'any') %}
@@ -63,10 +64,6 @@ Equivalent to [HTMLElement.dataset](https://developer.mozilla.org/en-US/docs/Web
6364
Equivalent to [HTMLElement.dir](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dir). The default value of `"auto"` is not set on *nested* text elements.
6465
{% endcall %}
6566

66-
{% call macro.prop('focusable', '?boolean') %}
67-
Set whether the view can receive keyboard focus.
68-
{% endcall %}
69-
7067
{% call macro.prop('href', '?string') %}
7168
If `href` is defined, the view is rendered as an anchor tag pointing to this URL.
7269
{% endcall %}
@@ -75,12 +72,12 @@ If `href` is defined, the view is rendered as an anchor tag pointing to this URL
7572
If `href` is defined, this prop defines related attributes to include on the anchor (e.g., `download`, `rel`, `target`) which may modify its behavior.
7673
{% endcall %}
7774

78-
{% call macro.prop('lang', '?string') %}
79-
Equivalent to [HTMLElement.lang](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang). This prop is used to infer writing direction if no `dir` is set.
75+
{% call macro.prop('id', '?string') %}
76+
Equivalent to [HTMLElement.id](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id).
8077
{% endcall %}
8178

82-
{% call macro.prop('nativeID', '?string') %}
83-
Equivalent to [HTMLElement.id](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id).
79+
{% call macro.prop('lang', '?string') %}
80+
Equivalent to [HTMLElement.lang](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang). This prop is used to infer writing direction if no `dir` is set.
8481
{% endcall %}
8582

8683
{% call macro.prop('numberOfLines', '?number') %}
@@ -91,14 +88,14 @@ Truncates the text with an ellipsis after this many lines.
9188
This is invoked when a component is mounted and when its layout changes. `x` and `y` are the offsets from the parent node.
9289
{% endcall %}
9390

94-
{% call macro.prop('selectable', '?boolean = true') %}
95-
When `false`, the text is not selectable.
96-
{% endcall %}
97-
9891
{% call macro.prop('style', '?Style') %}
9992
Set the styles of the text. `Text` supports typographic styles in addition to those of `View`.
10093
{% endcall %}
10194

95+
{% call macro.prop('tabIndex', '0 | -1') %}
96+
Set whether the view can receive keyboard focus.
97+
{% endcall %}
98+
10299
{% call macro.prop('testID', '?string') %}
103100
Set the test selector label (via `data-testid`).
104101
{% endcall %}

packages/react-native-web-docs/src/pages/docs/components/view.md

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ permalink: /docs/view/index.html
55
eleventyNavigation:
66
key: View
77
parent: Components
8+
label: "Change"
89
---
910

1011
{% import "fragments/macros.html" as macro with context %}
@@ -37,20 +38,20 @@ import { View } from 'react-native';
3738
The [accessibility props]({{ '/docs/accessibility' | url }}).
3839
{% endcall %}
3940

40-
{% call macro.prop('...ClickProps') %}
41-
The [click props]({{ '/docs/interactions' | url }}).
41+
{% call macro.prop('...PointerProps') %}
42+
The [PointerEvent props]({{ '/docs/interactions' | url }}).
4243
{% endcall %}
4344

4445
{% call macro.prop('...FocusProps') %}
45-
The [focus props]({{ '/docs/interactions' | url }}).
46+
The [FocusEvent props]({{ '/docs/interactions' | url }}).
4647
{% endcall %}
4748

4849
{% call macro.prop('...KeyboardProps') %}
49-
The [keyboard props]({{ '/docs/interactions' | url }}).
50+
The [KeyboardEvent props]({{ '/docs/interactions' | url }}).
5051
{% endcall %}
5152

5253
{% call macro.prop('...ResponderProps') %}
53-
The [responder props]({{ '/docs/interactions' | url }}).
54+
The [ResponderEvent props]({{ '/docs/interactions' | url }}).
5455
{% endcall %}
5556

5657
{% call macro.prop('children', 'any') %}
@@ -65,10 +66,6 @@ Equivalent to [HTMLElement.dataset](https://developer.mozilla.org/en-US/docs/Web
6566
Equivalent to [HTMLElement.dir](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir).
6667
{% endcall %}
6768

68-
{% call macro.prop('focusable', '?boolean') %}
69-
Set whether the view can receive keyboard focus.
70-
{% endcall %}
71-
7269
{% call macro.prop('href', '?string') %}
7370
If `href` is defined, the view is rendered as an anchor tag pointing to this URL.
7471
{% endcall %}
@@ -77,26 +74,26 @@ If `href` is defined, the view is rendered as an anchor tag pointing to this URL
7774
If `href` is defined, this prop defines related attributes to include on the anchor (e.g., `download`, `rel`, `target`) which may modify its behavior.
7875
{% endcall %}
7976

80-
{% call macro.prop('lang', '?string') %}
81-
Equivalent to [HTMLElement.lang](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang). This prop is used to infer writing direction if no `dir` is set.
77+
{% call macro.prop('id', '?string') %}
78+
Equivalent to [HTMLElement.id](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id).
8279
{% endcall %}
8380

84-
{% call macro.prop('nativeID', '?string') %}
85-
Equivalent to [HTMLElement.id](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id).
81+
{% call macro.prop('lang', '?string') %}
82+
Equivalent to [HTMLElement.lang](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang). This prop is used to infer writing direction if no `dir` is set.
8683
{% endcall %}
8784

8885
{% call macro.prop('onLayout', '?({ nativeEvent: { layout: { x, y, width, height } } }) => void') %}
8986
This is invoked when a component is mounted and when its layout changes. `x` and `y` are the offsets from the parent node.
9087
{% endcall %}
9188

92-
{% call macro.prop('pointerEvents', '?("all" | "none" | "box-only" | "box-none")') %}
93-
Equivalent to [CSS pointer-events](https://developer.mozilla.org/en-US/docs/Web/CSS/pointer-events) with 2 additional values. A value of `"box-none"` preserves pointer events on the element's children; `"box-only"` disables pointer events on the element's children.
94-
{% endcall %}
95-
9689
{% call macro.prop('style', '?Style') %}
9790
Set the styles of the view.
9891
{% endcall %}
9992

93+
{% call macro.prop('tabIndex', '0 | -1') %}
94+
Set whether the view can receive keyboard focus.
95+
{% endcall %}
96+
10097
{% call macro.prop('testID', '?string') %}
10198
Set the test selector label (via `data-testid`).
10299
{% endcall %}

0 commit comments

Comments
 (0)