Skip to content

Commit 31ea21f

Browse files
committed
feat: update the transition for button auto click
1 parent 80714a3 commit 31ea21f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Shared/Components/Button/Button.component.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,9 @@ const Button = <ComponentType extends ButtonComponentType>({
180180

181181
autoClickTimeoutRef.current = setTimeout(() => {
182182
elementRef.current.click()
183-
// This is 100ms less than the duration of the transition in CSS
183+
// This is 5ms less than the duration of the transition in CSS
184184
// Make sure to update the same in CSS if this is changed
185-
}, 1900)
185+
}, 1495)
186186
}, 100)
187187
}
188188

src/Shared/Components/Button/button.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
background: linear-gradient(to left, $background 50%, $auto-click-bg-color 50%) left;
4040
background-size: 200% 100%;
4141
// Make sure to change the transition in Button.component.tsx as well if changed
42-
transition: background-position 2s linear;
42+
transition: background-position 1.5s ease-out;
4343
}
4444
}
4545

0 commit comments

Comments
 (0)