File tree Expand file tree Collapse file tree 3 files changed +4
-1
lines changed Expand file tree Collapse file tree 3 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ type Config = {
22
22
23
23
// Whether to animate the product tour. (default: true)
24
24
animate? : boolean ;
25
+ // Animation duration in milliseconds. (default: 400ms)
26
+ duration? : boolean ;
25
27
// Overlay color. (default: black)
26
28
// This is useful when you have a dark background
27
29
// and want to highlight elements with a light
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ export type Config = {
12
12
steps ?: DriveStep [ ] ;
13
13
14
14
animate ?: boolean ;
15
+ duration ?: number ;
15
16
overlayColor ?: string ;
16
17
overlayOpacity ?: number ;
17
18
smoothScroll ?: boolean ;
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ export function refreshActiveHighlight() {
57
57
}
58
58
59
59
function transferHighlight ( toElement : Element , toStep : DriveStep ) {
60
- const duration = 400 ;
60
+ const duration = getConfig ( "duration" ) || 400 ;
61
61
const start = Date . now ( ) ;
62
62
63
63
const fromStep = getState ( "__activeStep" ) ;
You can’t perform that action at this time.
0 commit comments