Add react-native-keyboard-spacer types (#24993)

This commit is contained in:
Vincent Langlet
2018-04-14 21:13:47 +02:00
committed by Mohamed Hegazy
parent dda14dffe3
commit b4ef220eac
4 changed files with 47 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
// Type definitions for react-native-keyboard-spacer 0.4
// Project: https://github.com/Andr3wHur5t/react-native-keyboard-spacer#readme
// Definitions by: Vincent Langlet <https://github.com/VincentLanglet>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.6
import * as React from 'react';
import * as ReactNative from 'react-native';
export interface KeyboardSpacerProps {
topSpacing?: number;
onToggle?: (keyboardIsOpen: boolean, keyboardSpace: number) => void;
style?: ReactNative.StyleProp<ReactNative.ViewStyle>;
}
export default class KeyboardSpacer extends React.Component<KeyboardSpacerProps, any> { }

View File

@@ -0,0 +1,6 @@
import * as React from 'react';
import KeyboardSpacer from 'react-native-keyboard-spacer';
() => {
<KeyboardSpacer />;
};

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-keyboard-spacer-tests.tsx"
]
}

View File

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