Skip to content

Commit 70962b8

Browse files
committed
add modal delay
1 parent 81b97ff commit 70962b8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lazy-components/modal-tour/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ const ModalTour = memo( props => {
7474
// eslint-disable-next-line no-unused-vars
7575
postStep = NOOP, // If provided, this is a function to run after the step is shown.
7676
skipIf = NOOP, // If provided, this is a function to check if the step should be skipped.
77+
modalDelay = 200, // If provided, this is the delay in milliseconds to show the modal.
7778
} = steps[ currentStep ]
7879

7980
useEffect( () => {
@@ -149,7 +150,7 @@ const ModalTour = memo( props => {
149150
setIsVisibleDelayed( true )
150151
setIsTransitioning( false )
151152
}, 150 )
152-
}, 200 )
153+
}, modalDelay )
153154
}, 100 )
154155

155156
setTimeout( () => {

0 commit comments

Comments
 (0)