From cdda1ee291457ecd820076422322fbc1771faa39 Mon Sep 17 00:00:00 2001 From: Andrew Matheny Date: Thu, 7 Feb 2019 09:40:30 -0500 Subject: [PATCH] Adds index.d.ts --- .gitignore | 1 + index.d.ts | 26 ++++++++++++++++++++++++++ package.json | 3 ++- 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 index.d.ts diff --git a/.gitignore b/.gitignore index 68f8a2c..2a06dd8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ npm-debug\.log +node_modules diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..2151b07 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,26 @@ +declare module "react-native-parallax-header" { + import * as React from "react"; + import * as ReactNative from "react-native"; + + interface RNParallaxHeaderProps { + renderNavBar?: () => React.ReactElement; + renderContent: () => React.ReactElement; + backgroundColor?: string; + backgroundImage?: ReactNative.ImageSourcePropType; + navbarColor?: string; + title?: string | React.ReactElement; + titleStyle?: ReactNative.StyleProp; + headerMaxHeight?: number; + headerMinHeight?: number; + scrollEventThrottle?: number; + extraScrollHeight?: number; + backgroundImageScale?: number; + contentContainerStyle?: ReactNative.StyleProp; + containerStyle?: ReactNative.StyleProp; + alwaysShowTitle?: boolean; + alwaysShowNavBar?: boolean; + statusBarColor?: string; + } + class ReactNativeParallaxHeader extends React.Component {} + export = ReactNativeParallaxHeader; +} diff --git a/package.json b/package.json index 1247ea3..f0cc407 100644 --- a/package.json +++ b/package.json @@ -21,5 +21,6 @@ "bugs": { "url": "https://github.com/kyaroru/RNParallax/issues" }, - "homepage": "https://github.com/kyaroru/RNParallax#readme" + "homepage": "https://github.com/kyaroru/RNParallax#readme", + "typings": "./index.d.ts" }