Skip to content

Commit 2fe1c10

Browse files
committed
ref(scraps): dial in animtation
1 parent 0f08fe3 commit 2fe1c10

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

static/app/components/core/button/button.tsx

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,13 @@ export function Button({
7676
as="span"
7777
align="center"
7878
style={{
79-
transition: busy ? theme.motion.smooth.fast : theme.motion.exit.fast,
80-
transitionProperty: 'opacity, transform',
79+
transition: busy
80+
? `opacity ${theme.motion.smooth.fast}, transform ${theme.motion.smooth.fast}`
81+
: `opacity ${theme.motion.exit.fast}, transform ${theme.motion.exit.fast}`,
8182
opacity: busy ? 0 : 1,
82-
transform: busy ? `translateY(${theme.space['2xs']})` : 'translateY(0)',
83+
transform: busy
84+
? `translateY(${theme.space['2xs']}) scale(0.95)`
85+
: 'translateY(0) scale(1)',
8386
}}
8487
>
8588
{props.icon && (
@@ -111,10 +114,13 @@ export function Button({
111114
inset="0"
112115
style={{
113116
marginInline: '-4px',
114-
transition: busy ? theme.motion.exit.fast : theme.motion.smooth.fast,
115-
transitionProperty: 'opacity, transform',
117+
transition: busy
118+
? `opacity ${theme.motion.exit.fast}, transform ${theme.motion.exit.fast}`
119+
: `opacity ${theme.motion.smooth.fast}, transform ${theme.motion.smooth.fast}`,
116120
opacity: busy ? 1 : 0,
117-
transform: busy ? 'translateY(0)' : `translateY(-${theme.space['2xs']})`,
121+
transform: busy
122+
? 'translateY(0) scale(1)'
123+
: `translateY(-${theme.space['2xs']}) scale(0.95)`,
118124
pointerEvents: busy ? undefined : 'none',
119125
}}
120126
>

0 commit comments

Comments
 (0)