npm.io
0.6.6 • Published 2 years ago

@types/react-primitives

Licence
MIT
Version
0.6.6
Deps
2
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

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.