Skip to content

Commit 23816e8

Browse files
committed
Fix accidental deletion; only swap Action Sheet URLs
1 parent 9cd252b commit 23816e8

File tree

8 files changed

+664
-8
lines changed

8 files changed

+664
-8
lines changed

docs/actionsheetios.md

Lines changed: 83 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,86 @@ export default App;
5959
```
6060

6161
# Reference
62-
```
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 t[...]
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

website/versioned_docs/version-0.77/actionsheetios.md

Lines changed: 83 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,86 @@ export default App;
5959
```
6060

6161
# Reference
62-
```
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 t[...]
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

website/versioned_docs/version-0.78/actionsheetios.md

Lines changed: 83 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,86 @@ export default App;
5959
```
6060

6161
# Reference
62-
```
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 t[...]
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

website/versioned_docs/version-0.79/actionsheetios.md

Lines changed: 83 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,86 @@ export default App;
5959
```
6060

6161
# Reference
62-
```
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 t[...]
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)