Add react-native-elevated-view types

This commit is contained in:
fhelwanger
2018-03-24 22:57:25 -03:00
parent 2e3cfeee51
commit 370bb2b55d
4 changed files with 49 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
// Type definitions for react-native-elevated-view 0.0
// Project: https://github.com/alekhurst/react-native-elevated-view
// 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 ElevatedViewProperties extends ReactNative.ViewProperties {
elevation?: number;
}
export default class ElevatedView extends React.Component<ElevatedViewProperties> {}

View File

@@ -0,0 +1,10 @@
import * as React from "react";
import ElevatedView from "react-native-elevated-view";
() => {
<ElevatedView />;
};
() => {
<ElevatedView elevation={5} style={{ backgroundColor: 'red' }} />;
};

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-elevated-view-tests.tsx"
]
}

View File

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