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

0.6.6 • Public • Published

Installation

npm install --save @types/react-primitives

Summary

This package contains type definitions for react-primitives (https://github.com/lelandrichardson/react-primitives).

Details

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

index.d.ts

import { ComponentType } from "react";
import {
    Animated,
    Dimensions,
    Easing,
    Image,
    PixelRatio,
    PlatformOSType as RNPlatformOSType,
    StyleSheet,
    Text,
    TouchableOpacityProps,
    View,
} from "react-native";

export const Touchable: ComponentType<TouchableOpacityProps>;

// react-primitives also supports react-sketchapp and react-vr as platforms
export type PlatformOSType = RNPlatformOSType | "sketch" | "vr";
export interface PlatformStatic {
    OS: PlatformOSType;
    Version: number | string;
    select<T>(specifics: { [platform in PlatformOSType | "default"]?: T }): T;
}
export const Platform: PlatformStatic;

export { Animated, Dimensions, Easing, Image, PixelRatio, StyleSheet, Text, View };

Additional Details

Credits

These definitions were written by Ahmed Ghoneim, and David Pett.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/react-primitives

Weekly Downloads

183

Version

0.6.6

License

MIT

Unpacked Size

4.46 kB

Total Files

5

Last publish

Collaborators

  • types