Skip to content

Commit 5a8dfd4

Browse files
gianpajhramos
authored andcommitted
Document tintColor option for ActionSheetIOS (#36)
* Document `tintColor` option for ActionSheetIOS also: - fixed the `showActionSheetWithOptions` example This option was added in facebook/react-native#4590 FYI, this is not even documented in the comments https://github.com/facebook/react-native/blob/master/Libraries/ActionSheetIOS/ActionSheetIOS.js#L28 Are the docs generated from the code? Should I update that instead? * add tintColor option in docs/ folder as well
1 parent a6cca39 commit 5a8dfd4

File tree

2 files changed

+19
-15
lines changed

2 files changed

+19
-15
lines changed

docs/actionsheetios.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,15 @@ title: ActionSheetIOS
2020
static showActionSheetWithOptions(options, callback)
2121
```
2222

23-
Display an iOS action sheet. The `options` object must contain one or more of:
24-
25-
* `options` (array of strings) - a list of button titles (required)
26-
* `cancelButtonIndex` (int) - index of cancel button in `options`
27-
* `destructiveButtonIndex` (int) - index of destructive button in `options`
28-
* `title` (string) - a title to show above the action sheet
29-
* `message` (string) - a message to show below the title
23+
Display an iOS action sheet. The `options` object must contain one or more
24+
of:
25+
26+
- `options` (array of strings) - a list of button titles (required)
27+
- `cancelButtonIndex` (int) - index of cancel button in `options`
28+
- `destructiveButtonIndex` (int) - index of destructive button in `options`
29+
- `title` (string) - a title to show above the action sheet
30+
- `message` (string) - a message to show below the title
31+
- `tintColor` (string) - the [color](colors.md) used for non-destructive button titles
3032

3133
The 'callback' function takes one parameter, the zero-based index of the selected item.
3234

website/versioned_docs/version-0.51/actionsheetios.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@ original_id: actionsheetios
2121
static showActionSheetWithOptions(options, callback)
2222
```
2323

24-
Display an iOS action sheet. The `options` object must contain one or more of:
24+
Display an iOS action sheet. The `options` object must contain one or more
25+
of:
2526

26-
* `options` (array of strings) - a list of button titles (required)
27-
* `cancelButtonIndex` (int) - index of cancel button in `options`
28-
* `destructiveButtonIndex` (int) - index of destructive button in `options`
29-
* `title` (string) - a title to show above the action sheet
30-
* `message` (string) - a message to show below the title
27+
- `options` (array of strings) - a list of button titles (required)
28+
- `cancelButtonIndex` (int) - index of cancel button in `options`
29+
- `destructiveButtonIndex` (int) - index of destructive button in `options`
30+
- `title` (string) - a title to show above the action sheet
31+
- `message` (string) - a message to show below the title
32+
- `tintColor` (string) - the [color](colors.md) used for non-destructive button titles
3133

3234
The 'callback' function takes one parameter, the zero-based index of the selected item.
3335

@@ -36,8 +38,8 @@ Minimal example:
3638
```
3739
ActionSheetIOS.showActionSheetWithOptions({
3840
options: ['Remove', 'Cancel'],
39-
destructiveButtonIndex: 1,
40-
cancelButtonIndex: 0,
41+
destructiveButtonIndex: 0,
42+
cancelButtonIndex: 1,
4143
},
4244
(buttonIndex) => {
4345
if (buttonIndex === 1) { /* destructive action */ }

0 commit comments

Comments
 (0)