Skip to content

Commit 8f0233d

Browse files
committed
Revert re-cut of 0.86 docs; keep only versions.json publish
1 parent 800373e commit 8f0233d

54 files changed

Lines changed: 21048 additions & 21081 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

website/versioned_docs/version-0.86/_integration-with-existing-apps-ios.md

Lines changed: 655 additions & 655 deletions
Large diffs are not rendered by default.

website/versioned_docs/version-0.86/_integration-with-existing-apps-kotlin.md

Lines changed: 510 additions & 510 deletions
Large diffs are not rendered by default.

website/versioned_docs/version-0.86/accessibility.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -521,13 +521,13 @@ When adding support for standard actions, `name` must be one of the following:
521521
- `'magicTap'` - iOS only - While VoiceOver focus is on or inside the component, the user double tapped with two fingers.
522522
- `'escape'` - iOS only - While VoiceOver focus is on or inside the component, the user performed a two-finger scrub gesture (left, right, left).
523523
- `'activate'` - Activate the component. This should perform the same action with, or without, assistive technology. Engaged when a screen reader user double taps the component.
524-
- `'increment'` - Increment an adjustable component. On iOS, VoiceOver generates this action when the component has a role of `'adjustable'` and the user places focus on it and swipes upward. On Android, in TalkBack versions 8.1 and below, this action is generated when the user focuses the component and presses the volume-up button. In TalkBack 9.1 and later, this was replaced by the "Adjust Reading Control" gesture (swiping upward on the focused control).
525-
- `'decrement'` - Decrement an adjustable component. On iOS, VoiceOver generates this action when the component has a role of `'adjustable'` and the user places focus on it and swipes downward. On Android, in TalkBack versions 8.2 and below, this action is generated when the user focuses the component and presses the volume-down button. In TalkBack 9.2 and later, this was replaced by the "Adjust Reading Control" gesture (swiping downward on the focused control).
524+
- `'increment'` - Increment an adjustable component. On iOS, VoiceOver generates this action when the component has a role of `'adjustable'` and the user places focus on it and swipes upward. On Android, TalkBack generates this action when the user places accessibility focus on the component and presses the volume-up button.
525+
- `'decrement'` - Decrement an adjustable component. On iOS, VoiceOver generates this action when the component has a role of `'adjustable'` and the user places focus on it and swipes downward. On Android, TalkBack generates this action when the user places accessibility focus on the component and presses the volume-down button.
526526
- `'longpress'` - Android only - This action is generated when the user places accessibility focus on the component, then double-taps and holds one finger on the screen. This should perform the same action with, or without, assistive technology.
527527
- `'expand'` - Android only - This action "expands" the component so that TalkBack will announce an "expanded" hint.
528528
- `'collapse'` - Android only - This action "collapses" the component so that TalkBack will announce a "collapsed" hint.
529529

530-
The `label` field is optional for standard actions and is used by assistive technologies to describe the specific result of an action. For example, TalkBack uses this field to override the default "Double tap to activate" announcement with a custom description like "Double tap to open chat." For custom actions, the `label` is a localized string containing a description of the action to be presented to the user.
530+
The `label` field is optional for standard actions and is often unused by assistive technologies. For custom actions, it is a localized string containing a description of the action to be presented to the user.
531531

532532
To handle action requests, a component must implement an `onAccessibilityAction` function. The only argument to this function is an event containing the name of the action to perform. The below example from RNTester shows how to create a component that defines and handles several custom actions.
533533

website/versioned_docs/version-0.86/accessibilityinfo.md

Lines changed: 292 additions & 292 deletions
Large diffs are not rendered by default.
Lines changed: 144 additions & 144 deletions
Original file line numberDiff line numberDiff line change
@@ -1,144 +1,144 @@
1-
---
2-
id: actionsheetios
3-
title: ActionSheetIOS
4-
---
5-
6-
Displays native to iOS [Action Sheet](https://developer.apple.com/design/human-interface-guidelines/action-sheets) component.
7-
8-
## Example
9-
10-
```SnackPlayer name=ActionSheetIOS%20Example&supportedPlatforms=ios
11-
import {useState} from 'react';
12-
import {ActionSheetIOS, Button, StyleSheet, Text} from 'react-native';
13-
import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
14-
15-
const App = () => {
16-
const [result, setResult] = useState('🔮');
17-
18-
const onPress = () =>
19-
ActionSheetIOS.showActionSheetWithOptions(
20-
{
21-
options: ['Cancel', 'Generate number', 'Reset'],
22-
destructiveButtonIndex: 2,
23-
cancelButtonIndex: 0,
24-
userInterfaceStyle: 'dark',
25-
},
26-
buttonIndex => {
27-
if (buttonIndex === 0) {
28-
// cancel action
29-
} else if (buttonIndex === 1) {
30-
setResult(String(Math.floor(Math.random() * 100) + 1));
31-
} else if (buttonIndex === 2) {
32-
setResult('🔮');
33-
}
34-
},
35-
);
36-
37-
return (
38-
<SafeAreaProvider>
39-
<SafeAreaView style={styles.container}>
40-
<Text style={styles.result}>{result}</Text>
41-
<Button onPress={onPress} title="Show Action Sheet" />
42-
</SafeAreaView>
43-
</SafeAreaProvider>
44-
);
45-
};
46-
47-
const styles = StyleSheet.create({
48-
container: {
49-
flex: 1,
50-
justifyContent: 'center',
51-
},
52-
result: {
53-
fontSize: 64,
54-
textAlign: 'center',
55-
},
56-
});
57-
58-
export default App;
59-
```
60-
61-
# Reference
62-
63-
## Methods
64-
65-
### `showActionSheetWithOptions()`
66-
67-
```tsx
68-
static showActionSheetWithOptions: (
69-
options: ActionSheetIOSOptions,
70-
callback: (buttonIndex: number) => void,
71-
);
72-
```
73-
74-
Display an iOS action sheet. The `options` object must contain one or more of:
75-
76-
- `options` (array of strings) - a list of button titles (required)
77-
- `cancelButtonIndex` (int) - index of cancel button in `options`
78-
- `cancelButtonTintColor` (string) - the [color](colors) used for the change the text color of the cancel button
79-
- `destructiveButtonIndex` (int or array of ints) - indices of destructive buttons in `options`
80-
- `title` (string) - a title to show above the action sheet
81-
- `message` (string) - a message to show below the title
82-
- `anchor` (number) - the node to which the action sheet should be anchored (used for iPad)
83-
- `tintColor` (string) - the [color](colors) used for non-destructive button titles
84-
- `disabledButtonIndices` (array of numbers) - a list of button indices which should be disabled
85-
- `userInterfaceStyle` (string) - the interface style used for the action sheet, can be set to `light` or `dark`, otherwise the default system style will be used
86-
87-
The 'callback' function takes one parameter, the zero-based index of the selected item.
88-
89-
Minimal example:
90-
91-
```tsx
92-
ActionSheetIOS.showActionSheetWithOptions(
93-
{
94-
options: ['Cancel', 'Remove'],
95-
destructiveButtonIndex: 1,
96-
cancelButtonIndex: 0,
97-
},
98-
buttonIndex => {
99-
if (buttonIndex === 1) {
100-
/* destructive action */
101-
}
102-
},
103-
);
104-
```
105-
106-
---
107-
108-
### `dismissActionSheet()`
109-
110-
```tsx
111-
static dismissActionSheet();
112-
```
113-
114-
Dismisses the most upper iOS action sheet presented, if no action sheet is present a warning is displayed.
115-
116-
---
117-
118-
### `showShareActionSheetWithOptions()`
119-
120-
```tsx
121-
static showShareActionSheetWithOptions: (
122-
options: ShareActionSheetIOSOptions,
123-
failureCallback: (error: Error) => void,
124-
successCallback: (success: boolean, method: string) => void,
125-
);
126-
```
127-
128-
Display the iOS share sheet. The `options` object should contain one or both of `message` and `url` and can additionally have a `subject` or `excludedActivityTypes`:
129-
130-
- `url` (string) - a URL to share
131-
- `message` (string) - a message to share
132-
- `subject` (string) - a subject for the message
133-
- `excludedActivityTypes` (array) - the activities to exclude from the ActionSheet
134-
135-
:::note
136-
If `url` points to a local file, or is a base64-encoded uri, the file it points to will be loaded and shared directly. In this way, you can share images, videos, PDF files, etc. If `url` points to a remote file or address it must conform to URL format as described in [RFC 2396](https://www.ietf.org/rfc/rfc2396.txt). For example, a web URL without a proper protocol (HTTP/HTTPS) will not be shared.
137-
:::
138-
139-
The 'failureCallback' function takes one parameter, an error object. The only property defined on this object is an optional `stack` property of type `string`.
140-
141-
The 'successCallback' function takes two parameters:
142-
143-
- a boolean value signifying success or failure
144-
- a string that, in the case of success, indicates the method of sharing
1+
---
2+
id: actionsheetios
3+
title: ActionSheetIOS
4+
---
5+
6+
Displays native to iOS [Action Sheet](https://developer.apple.com/design/human-interface-guidelines/action-sheets) component.
7+
8+
## Example
9+
10+
```SnackPlayer name=ActionSheetIOS%20Example&supportedPlatforms=ios
11+
import {useState} from 'react';
12+
import {ActionSheetIOS, Button, StyleSheet, Text} from 'react-native';
13+
import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
14+
15+
const App = () => {
16+
const [result, setResult] = useState('🔮');
17+
18+
const onPress = () =>
19+
ActionSheetIOS.showActionSheetWithOptions(
20+
{
21+
options: ['Cancel', 'Generate number', 'Reset'],
22+
destructiveButtonIndex: 2,
23+
cancelButtonIndex: 0,
24+
userInterfaceStyle: 'dark',
25+
},
26+
buttonIndex => {
27+
if (buttonIndex === 0) {
28+
// cancel action
29+
} else if (buttonIndex === 1) {
30+
setResult(String(Math.floor(Math.random() * 100) + 1));
31+
} else if (buttonIndex === 2) {
32+
setResult('🔮');
33+
}
34+
},
35+
);
36+
37+
return (
38+
<SafeAreaProvider>
39+
<SafeAreaView style={styles.container}>
40+
<Text style={styles.result}>{result}</Text>
41+
<Button onPress={onPress} title="Show Action Sheet" />
42+
</SafeAreaView>
43+
</SafeAreaProvider>
44+
);
45+
};
46+
47+
const styles = StyleSheet.create({
48+
container: {
49+
flex: 1,
50+
justifyContent: 'center',
51+
},
52+
result: {
53+
fontSize: 64,
54+
textAlign: 'center',
55+
},
56+
});
57+
58+
export default App;
59+
```
60+
61+
# Reference
62+
63+
## Methods
64+
65+
### `showActionSheetWithOptions()`
66+
67+
```tsx
68+
static showActionSheetWithOptions: (
69+
options: ActionSheetIOSOptions,
70+
callback: (buttonIndex: number) => void,
71+
);
72+
```
73+
74+
Display an iOS action sheet. The `options` object must contain one or more of:
75+
76+
- `options` (array of strings) - a list of button titles (required)
77+
- `cancelButtonIndex` (int) - index of cancel button in `options`
78+
- `cancelButtonTintColor` (string) - the [color](colors) used for the change the text color of the cancel button
79+
- `destructiveButtonIndex` (int or array of ints) - indices of destructive buttons in `options`
80+
- `title` (string) - a title to show above the action sheet
81+
- `message` (string) - a message to show below the title
82+
- `anchor` (number) - the node to which the action sheet should be anchored (used for iPad)
83+
- `tintColor` (string) - the [color](colors) used for non-destructive button titles
84+
- `disabledButtonIndices` (array of numbers) - a list of button indices which should be disabled
85+
- `userInterfaceStyle` (string) - the interface style used for the action sheet, can be set to `light` or `dark`, otherwise the default system style will be used
86+
87+
The 'callback' function takes one parameter, the zero-based index of the selected item.
88+
89+
Minimal example:
90+
91+
```tsx
92+
ActionSheetIOS.showActionSheetWithOptions(
93+
{
94+
options: ['Cancel', 'Remove'],
95+
destructiveButtonIndex: 1,
96+
cancelButtonIndex: 0,
97+
},
98+
buttonIndex => {
99+
if (buttonIndex === 1) {
100+
/* destructive action */
101+
}
102+
},
103+
);
104+
```
105+
106+
---
107+
108+
### `dismissActionSheet()`
109+
110+
```tsx
111+
static dismissActionSheet();
112+
```
113+
114+
Dismisses the most upper iOS action sheet presented, if no action sheet is present a warning is displayed.
115+
116+
---
117+
118+
### `showShareActionSheetWithOptions()`
119+
120+
```tsx
121+
static showShareActionSheetWithOptions: (
122+
options: ShareActionSheetIOSOptions,
123+
failureCallback: (error: Error) => void,
124+
successCallback: (success: boolean, method: string) => void,
125+
);
126+
```
127+
128+
Display the iOS share sheet. The `options` object should contain one or both of `message` and `url` and can additionally have a `subject` or `excludedActivityTypes`:
129+
130+
- `url` (string) - a URL to share
131+
- `message` (string) - a message to share
132+
- `subject` (string) - a subject for the message
133+
- `excludedActivityTypes` (array) - the activities to exclude from the ActionSheet
134+
135+
:::note
136+
If `url` points to a local file, or is a base64-encoded uri, the file it points to will be loaded and shared directly. In this way, you can share images, videos, PDF files, etc. If `url` points to a remote file or address it must conform to URL format as described in [RFC 2396](https://www.ietf.org/rfc/rfc2396.txt). For example, a web URL without a proper protocol (HTTP/HTTPS) will not be shared.
137+
:::
138+
139+
The 'failureCallback' function takes one parameter, an error object. The only property defined on this object is an optional `stack` property of type `string`.
140+
141+
The 'successCallback' function takes two parameters:
142+
143+
- a boolean value signifying success or failure
144+
- a string that, in the case of success, indicates the method of sharing

0 commit comments

Comments
 (0)