File tree Expand file tree Collapse file tree 4 files changed +9
-14
lines changed Expand file tree Collapse file tree 4 files changed +9
-14
lines changed Original file line number Diff line number Diff line change 83
83
}
84
84
],
85
85
"dependencies" : {
86
- "parallax-controller" : " ^1.0.0 "
86
+ "parallax-controller" : " ^1.0.3 "
87
87
},
88
88
"devDependencies" : {
89
89
"@babel/core" : " ^7.16.0" ,
Original file line number Diff line number Diff line change @@ -73,8 +73,7 @@ describe('Expect the <Parallax> component', () => {
73
73
) ;
74
74
75
75
expect ( controller . createElement ) . toBeCalledWith ( {
76
- elInner : expect . any ( HTMLElement ) ,
77
- elOuter : expect . any ( HTMLElement ) ,
76
+ el : expect . any ( HTMLElement ) ,
78
77
props : { disabled : false , translateY : [ - 100 , 100 ] } ,
79
78
} ) ;
80
79
} ) ;
@@ -101,8 +100,7 @@ describe('Expect the <Parallax> component', () => {
101
100
} ) ;
102
101
103
102
expect ( controller . createElement ) . toBeCalledWith ( {
104
- elInner : expect . any ( HTMLElement ) ,
105
- elOuter : expect . any ( HTMLElement ) ,
103
+ el : expect . any ( HTMLElement ) ,
106
104
props : { disabled : false , rotate : [ '0deg' , '100deg' ] } ,
107
105
} ) ;
108
106
} ) ;
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ import { useVerifyController } from './hooks';
8
8
export function Parallax ( props : PropsWithChildren < ParallaxProps > ) {
9
9
const controller = useController ( ) ;
10
10
const refInner = useRef < HTMLElement > ( ) ;
11
- const refOuter = useRef < HTMLElement > ( ) ;
12
11
13
12
useVerifyController ( controller ) ;
14
13
@@ -36,9 +35,7 @@ export function Parallax(props: PropsWithChildren<ParallaxProps>) {
36
35
37
36
return {
38
37
// @ts -expect-error
39
- elInner : refInner . current ,
40
- // @ts -expect-error
41
- elOuter : refOuter . current ,
38
+ el : refInner . current ,
42
39
props : removeUndefinedObjectKeys ( {
43
40
translateX,
44
41
translateY,
@@ -120,7 +117,7 @@ export function Parallax(props: PropsWithChildren<ParallaxProps>) {
120
117
const Inner = props . innerTag ;
121
118
122
119
return (
123
- < Outer className = { props . className } ref = { refOuter } style = { props . style } >
120
+ < Outer className = { props . className } style = { props . style } >
124
121
< Inner
125
122
className = { props . innerClassName }
126
123
ref = { refInner }
Original file line number Diff line number Diff line change @@ -10913,10 +10913,10 @@ pako@~1.0.5:
10913
10913
resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf"
10914
10914
integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==
10915
10915
10916
- parallax-controller@^1.0.0 :
10917
- version "1.0.1 "
10918
- resolved "https://registry.yarnpkg.com/parallax-controller/-/parallax-controller-1.0.1 .tgz#6194c6f62d9c44490fa8a146d94fb91cf10c4120 "
10919
- integrity sha512-1A+aVtkHSX1vNOpMLJ76WbEk2U0Bkw5UdioQ8hQIYdWw7hvLSCS71UtIevl6XdzYgl00T3kk90N0zKNDSRz+yw ==
10916
+ parallax-controller@^1.0.3 :
10917
+ version "1.0.3 "
10918
+ resolved "https://registry.yarnpkg.com/parallax-controller/-/parallax-controller-1.0.3 .tgz#db67d90222130f959ad3d110d8a68c65bcd561ca "
10919
+ integrity sha512-P9DoUV/vh7Ipt+RNwUdmRyV6gA7eTfYg/7RmQovIsEEYL7uHRUE96KBDJabMZElw3/3TjrC52/m+ZlBF0ZekEw ==
10920
10920
dependencies:
10921
10921
bezier-easing "^2.1.0"
10922
10922
You can’t perform that action at this time.
0 commit comments