Skip to content

Commit 7a7169d

Browse files
committed
Use new design tokens for panel animations
1 parent 30a407f commit 7a7169d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

static/app/components/slideOverPanel.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {useEffect} from 'react';
22
import isPropValid from '@emotion/is-prop-valid';
3-
import {css} from '@emotion/react';
3+
import {css, useTheme} from '@emotion/react';
44
import styled from '@emotion/styled';
55
import {motion, type Transition} from 'framer-motion';
66

@@ -49,6 +49,8 @@ function SlideOverPanel({
4949
panelWidth,
5050
ref,
5151
}: SlideOverPanelProps) {
52+
const theme = useTheme();
53+
5254
useEffect(() => {
5355
if (!collapsed && onOpen) {
5456
onOpen();
@@ -69,9 +71,9 @@ function SlideOverPanel({
6971
exit={collapsedStyle}
7072
slidePosition={slidePosition}
7173
transition={{
72-
type: 'spring',
73-
stiffness: 1000,
74-
damping: 50,
74+
type: 'tween',
75+
ease: theme.motionControlPoints.enter,
76+
duration: theme.motionDurations.slow,
7577
...transitionProps,
7678
}}
7779
role="complementary"

0 commit comments

Comments
 (0)