@types/react-native-platform-touchable
TypeScript icon, indicating that this package has built-in type declarations

1.1.6 • Public • Published

Installation

npm install --save @types/react-native-platform-touchable

Summary

This package contains type definitions for react-native-platform-touchable (https://github.com/react-native-community/react-native-platform-touchable).

Details

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

index.d.ts

import * as React from "react";
import {
    BackgroundPropType,
    RippleBackgroundPropType,
    ThemeAttributeBackgroundPropType,
    TouchableWithoutFeedbackProps,
} from "react-native";

export interface PlatformTouchableProps extends TouchableWithoutFeedbackProps {
    // TouchableOpacity (default iOS)
    activeOpacity?: number | undefined;
    // TouchableNativeFeedback (default Android)
    background?: BackgroundPropType | undefined;
    foreground?: BackgroundPropType | undefined;
    // TouchableHighlight
    underlayColor?: string | undefined;
    onHideUnderlay?: (() => void) | undefined;
    onShowUnderlay?: (() => void) | undefined;
}

export class Touchable extends React.Component<PlatformTouchableProps> {
    // TouchableOpacity (default iOS)
    setOpacityTo: (value: number) => void;
    // TouchableNativeFeedback (default Android)
    static SelectableBackground(): ThemeAttributeBackgroundPropType;
    static SelectableBackgroundBorderless(): ThemeAttributeBackgroundPropType;
    static Ripple(color: string, borderless?: boolean): RippleBackgroundPropType;
    static canUseNativeForeground(): boolean;
}

export default Touchable;

Additional Details

Credits

These definitions were written by Toni Granados, and Joel Nordström.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/react-native-platform-touchable

Weekly Downloads

984

Version

1.1.6

License

MIT

Unpacked Size

5.45 kB

Total Files

5

Last publish

Collaborators

  • types