-
Notifications
You must be signed in to change notification settings - Fork 227
Expand file tree
/
Copy pathtypes.ts
More file actions
46 lines (42 loc) · 1.19 KB
/
types.ts
File metadata and controls
46 lines (42 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import * as React from 'react';
import { TextStyle, ViewStyle } from 'react-native';
export interface ActionSheetProps {
showActionSheetWithOptions: (
options: ActionSheetOptions,
callback: (i?: number) => void | Promise<void>
) => void;
}
export interface ActionSheetProviderRef extends ActionSheetProps {
/**
* @deprecated Simply call `showActionSheetWithOptions()` directly from the ref now
*/
getContext: () => ActionSheetProps;
}
// for iOS
export interface ActionSheetIOSOptions {
options: string[];
title?: string;
message?: string;
tintColor?: string;
cancelButtonIndex?: number;
cancelButtonTintColor?: string;
destructiveButtonIndex?: number | number[];
anchor?: number;
userInterfaceStyle?: 'light' | 'dark';
disabledButtonIndices?: number[];
}
// for Android or Web
export interface ActionSheetOptions extends ActionSheetIOSOptions {
icons?: React.ReactNode[];
tintIcons?: boolean;
textStyle?: TextStyle;
titleTextStyle?: TextStyle;
messageTextStyle?: TextStyle;
autoFocus?: boolean;
showSeparators?: boolean;
containerStyle?: ViewStyle;
separatorStyle?: ViewStyle;
useModal?: boolean;
destructiveColor?: string;
stickyCancel?: boolean;
}