npm.io
2.4.7 • Published 2 years ago

@types/react-native-actionsheet

Licence
MIT
Version
2.4.7
Deps
1
Size
5 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/react-native-actionsheet

Summary

This package contains type definitions for react-native-actionsheet (https://github.com/beefe/react-native-actionsheet).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-native-actionsheet.

index.d.ts

import * as React from "react";

export interface ActionSheetProps {
    options: string[];
    onPress: (index: number) => void;
    title?: string | undefined;
    message?: string | undefined;
    tintColor?: string | undefined;
    cancelButtonIndex?: number | undefined;
    destructiveButtonIndex?: number | undefined;
}

export interface ActionSheetCustomProps {
    options: React.ReactNode[];
    onPress: (index: number) => void;
    title?: React.ReactNode | undefined;
    message?: string | undefined;
    tintColor?: string | undefined;
    buttonUnderlayColor?: string | undefined;
    cancelButtonIndex?: number | undefined;
    destructiveButtonIndex?: number | undefined;
    styles?: object | undefined;
}

export default class ActionSheet extends React.Component<ActionSheetProps> {
    show: () => void;
}

export class ActionSheetCustom extends React.Component<ActionSheetCustomProps> {
    hide: (index?: number) => void;
    show: () => void;
}

Additional Details

  • Last updated: Thu, 21 Dec 2023 1951 GMT
  • Dependencies: @types/react

Credits

These definitions were written by Ian.