File tree 1 file changed +16
-4
lines changed
packages/react-overlay/src
1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ export default function Overlay(props: OverlayProps) {
56
56
onClosing = noop ,
57
57
onClosed = noop ,
58
58
onClose = noop ,
59
+ onEnter = noop ,
59
60
children,
60
61
dialogProps = { } ,
61
62
...otherProps
@@ -134,10 +135,21 @@ export default function Overlay(props: OverlayProps) {
134
135
unmountOnExit = { unmountOnExit }
135
136
timeout = { timeout ! }
136
137
in = { isOpen }
137
- onEntering = { onOpening }
138
- onEntered = { onOpened }
139
- onExiting = { onClosing }
140
- onExited = { handleClosed }
138
+ onEnter = { ( _ , isAppearing ) => {
139
+ onEnter ( overlay . current ! , isAppearing ) ;
140
+ } }
141
+ onEntering = { ( _ , isAppearing ) => {
142
+ onOpening ( overlay . current ! , isAppearing ) ;
143
+ } }
144
+ onEntered = { ( _ , isAppearing ) => {
145
+ onOpened ( overlay . current ! , isAppearing ) ;
146
+ } }
147
+ onExiting = { ( ) => {
148
+ onClosing ( overlay . current ! ) ;
149
+ } }
150
+ onExited = { ( ) => {
151
+ handleClosed ( overlay . current ! ) ;
152
+ } }
141
153
nodeRef = { overlay }
142
154
{ ...otherProps }
143
155
>
You can’t perform that action at this time.
0 commit comments