[react-native-loading-spinner-overlay] Add react-native-loading-spinner-overlay typings (#23829)

* Add react-native-loading-spinner-overlay typings

* Match `react` typescript version
This commit is contained in:
Fernando Alex Helwanger 2018-02-26 16:44:12 -03:00 committed by Andy
parent 317dfc327a
commit cc7370ac0e
4 changed files with 65 additions and 0 deletions

View File

@ -0,0 +1,21 @@
// Type definitions for react-native-loading-spinner-overlay 0.5
// Project: https://github.com/joinspontaneous/react-native-loading-spinner-overlay
// Definitions by: fhelwanger <https://github.com/fhelwanger>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.6
import * as React from "react";
import * as ReactNative from "react-native";
export interface SpinnerProps {
cancelable?: boolean;
color?: string;
animation?: "none" | "slide" | "fade";
overlayColor?: string;
size?: "normal" | "small" | "large";
textContent?: string;
textStyle?: ReactNative.StyleProp<ReactNative.TextStyle>;
visible?: boolean;
}
export default class Spinner extends React.Component<SpinnerProps> {}

View File

@ -0,0 +1,19 @@
import * as React from "react";
import Spinner from "react-native-loading-spinner-overlay";
() => {
<Spinner />;
};
() => {
<Spinner
cancelable={false}
color="red"
animation="slide"
overlayColor="black"
size="small"
textContent="text"
textStyle={{ fontSize: 14 }}
visible={true}
/>;
};

View File

@ -0,0 +1,24 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true,
"jsx": "react"
},
"files": [
"index.d.ts",
"react-native-loading-spinner-overlay-tests.tsx"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }