-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathuseHeadroom.d.ts
46 lines (40 loc) · 1.14 KB
/
useHeadroom.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
declare type UseHeadroomPropsT = {
/**
* onPin prop will trigger a given function
* every time the navbar got pinned (shown)
*/
onPin?: (...args: Array<any>) => void;
/**
* onUnPin prop will trigger a given function
* every time the navbar got unpinned (hidden)
*/
onUnpin?: (...args: Array<any>) => void;
/**
* onFix prop will trigger a given function
* every time the navbar got fixed using the
* fixAt prop (when the viewport scroll is smaller than fixAt value)
*/
onFix?: (...args: Array<any>) => void;
/**
* onUnfix prop will trigger a given function
* every time the navbar got unfixed from the
* fixAt value (when the viewport scroll went up than fixAt value)
*/
onUnfix?: (...args: Array<any>) => void;
/**
* fixAt is a value in pixels, in which the navbar will be fixed (default value: 0)
*/
fixAt?: number;
};
/**
*
* Demos:
*
* - [useHeadroom](https://codesandbox.io/s/tender-snowflake-zf79v)
*
* API:
*
* - [useHeadroom API](https://www.npmjs.com/package/react-useheadroom)
*/
declare const useHeadroom: (props?: UseHeadroomPropsT) => boolean;
export default useHeadroom;