File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
src/hooks/useScrollEffect Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -8,15 +8,21 @@ interface CustomHookReturnValue {
8
8
shadowRef : ( node ) => void ;
9
9
}
10
10
11
+ interface CustomHookProps {
12
+ shadowStyles ?: string ;
13
+ conditional ?: boolean ;
14
+ shadowVisible ?: number ;
15
+ }
16
+
11
17
const MAX_PERCENTAGE = 100 ;
12
18
const proportionLimit = 1.25 ;
13
19
const defaultShadow = 'none' ;
14
20
15
- export const useScrollEffect = (
21
+ export const useScrollEffect = ( {
16
22
conditional = true ,
17
23
shadowStyles = defaultShadow ,
18
- shadowVisible = 1
19
- ) : CustomHookReturnValue => {
24
+ shadowVisible = 1 ,
25
+ } : CustomHookProps ) : CustomHookReturnValue => {
20
26
// the scrollable element ref
21
27
const innerScrollableRef = useRef < HTMLElement | null > ( null ) ;
22
28
// the element ref to change the height and width
You can’t perform that action at this time.
0 commit comments