Skip to content

Commit 3da4bac

Browse files
committed
fix: switch delay
1 parent 0b5d024 commit 3da4bac

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

packages/blade/src/components/Switch/AnimatedThumbIcon.web.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const AnimatedThumbIcon = styled(Svg)<{ isChecked?: boolean }>(({ isChecked, the
1111
return {
1212
transitionDuration: `${makeMotionTime(duration)}`,
1313
transitionTimingFunction: easing,
14-
transitionDelay: isChecked ? `${makeMotionTime(theme.motion.delay['xquick'])}` : `0ms`,
14+
transitionDelay: isChecked ? `${makeMotionTime(theme.motion.delay['2xquick'])}` : `0ms`,
1515
opacity: isChecked ? 1 : 0,
1616
};
1717
});

packages/blade/src/tokens/global/motion.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ type Duration = {
2121
};
2222

2323
type Delay = {
24+
/** `80` milliseconds */
25+
'2xquick': 80;
2426
/** `160` milliseconds */
2527
xquick: 160;
2628
/** `280` milliseconds */
@@ -119,6 +121,7 @@ export type DurationString = `duration.${keyof Duration}`;
119121
export type DelayString = `delay.${keyof Delay}`;
120122

121123
const delay: Delay = {
124+
'2xquick': 80,
122125
xquick: 160,
123126
moderate: 280,
124127
gentle: 480,

0 commit comments

Comments
 (0)