Skip to content

Commit d0ab5db

Browse files
committed
2 parents 30253cc + 5e8daaa commit d0ab5db

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ The `ParallaxScrollView` component adds a few additional properties, as describe
102102
| Property | Type | Required | Description |
103103
| -------- | ---- | -------- | ----------- |
104104
| `backgroundColor` | `string` | No | The color of the header background. Defaults to `#000`) |
105-
| `backgroundSpeed` | `number` | No | The speed factor that the background moves at relative to the foreground. Defaults to 5. |
105+
| `backgroundScrollSpeed` | `number` | No | The speed factor that the background moves at relative to the foreground. Defaults to 5. |
106106
| `contentBackgroundColor` | `string` | No | This is the background color of the content. (Defaults to `'#fff'`) |
107107
| `fadeOutForeground` | `bool` | No | If `true`, the foreground will fade out as the user scrolls up. (Defaults to `true`) |
108108
| `onChangeHeaderVisibility` | `func` | No | A callback function that is invoked when the parallax header is hidden or shown (as the user is scrolling). Function is called with a `boolean` value to indicate whether header is visible or not. |

index.d.ts

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import * as React from 'react';
2+
3+
declare class ParallaxScrollView extends React.Component<ParallaxScrollViewProps, {}> {
4+
5+
}
6+
7+
export interface ParallaxScrollViewProps {
8+
backgroundScrollSpeed?: number;
9+
backgroundColor?: string;
10+
contentBackgroundColor?: string;
11+
fadeOutForeground?: boolean;
12+
onChangeHeaderVisibility?: (value: boolean) => void;
13+
renderScrollComponent?: (props: any) => JSX.Element;
14+
renderBackground?: (params: RenderBackgroundParams) => JSX.Element;
15+
renderForeground?: () => JSX.Element;
16+
renderFixedHeader?: () => JSX.Element;
17+
renderStickyHeader?: () => JSX.Element;
18+
stickyHeaderHeight?: number;
19+
contentContainerStyle?: any;
20+
outputScaleValue?: number;
21+
style?: any;
22+
parallaxHeaderHeight?: number;
23+
}
24+
25+
export class RenderBackgroundParams {
26+
fadeOutForeground: any;
27+
backgroundScrollSpeed: number;
28+
backgroundColor: string;
29+
parallaxHeaderHeight: number;
30+
stickyHeaderHeight: number;
31+
renderBackground: () => void;
32+
outputScaleValue: number;
33+
}
34+
35+
export default ParallaxScrollView;

0 commit comments

Comments
 (0)