DefinitelyTyped/types/react-native-actionsheet/index.d.ts
Krister Kari 0278a498f7 [@types/react-native-actionsheet] Add missing ActionSheetCustom (#37240)
* [@types/react-native-actionsheet] Add missing ActionSheetCustom

* Add missing buttonUnderlayColor
2019-08-01 12:38:05 -07:00

38 lines
1.0 KiB
TypeScript

// Type definitions for react-native-actionsheet 2.4
// Project: https://github.com/beefe/react-native-actionsheet
// Definitions by: Ian <https://github.com/ian-rudge>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
import * as React from 'react';
export interface ActionSheetProps {
options: string[];
onPress: (index: number) => void;
title?: string;
message?: string;
tintColor?: string;
cancelButtonIndex?: number;
destructiveButtonIndex?: number;
}
export interface ActionSheetCustomProps {
options: React.ReactNode[];
onPress: (index: number) => void;
title?: React.ReactNode;
message?: string;
tintColor?: string;
buttonUnderlayColor?: string;
cancelButtonIndex?: number;
destructiveButtonIndex?: number;
styles?: object;
}
export default class ActionSheet extends React.Component<ActionSheetProps> {
show: () => void;
}
export class ActionSheetCustom extends React.Component<ActionSheetCustomProps> {
show: () => void;
}