UNPKG

1.2 kBTypeScriptView Raw
1import * as React from 'react';
2import { TextStyle, ViewStyle } from 'react-native';
3export interface ActionSheetProps {
4 showActionSheetWithOptions: (options: ActionSheetOptions, callback: (i?: number) => void | Promise<void>) => void;
5}
6export interface ActionSheetProviderRef extends ActionSheetProps {
7 /**
8 * @deprecated Simply call `showActionSheetWithOptions()` directly from the ref now
9 */
10 getContext: () => ActionSheetProps;
11}
12export interface ActionSheetIOSOptions {
13 options: string[];
14 title?: string;
15 message?: string;
16 tintColor?: string;
17 cancelButtonIndex?: number;
18 cancelButtonTintColor?: string;
19 destructiveButtonIndex?: number | number[];
20 anchor?: number;
21 userInterfaceStyle?: 'light' | 'dark';
22 disabledButtonIndices?: number[];
23}
24export interface ActionSheetOptions extends ActionSheetIOSOptions {
25 icons?: React.ReactNode[];
26 tintIcons?: boolean;
27 textStyle?: TextStyle;
28 titleTextStyle?: TextStyle;
29 messageTextStyle?: TextStyle;
30 autoFocus?: boolean;
31 showSeparators?: boolean;
32 containerStyle?: ViewStyle;
33 separatorStyle?: ViewStyle;
34 useModal?: boolean;
35 destructiveColor?: string;
36}