Skip to content

Commit 524c51a

Browse files
committed
Animate using transform
More better performance!
1 parent 0d8f123 commit 524c51a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

static/app/views/dashboards/widgetBuilder/components/newWidgetBuilder.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,9 +332,9 @@ export function WidgetPreviewContainer({
332332
};
333333

334334
const animatedProps: MotionNodeAnimationOptions = {
335-
initial: {opacity: 0, x: '100%', y: 0},
336-
animate: {opacity: 1, x: 0, y: 0},
337-
exit: {opacity: 0, x: '100%', y: 0},
335+
initial: {opacity: 0, transform: 'translateX(100%) translateY(0)'},
336+
animate: {opacity: 1, transform: 'translateX(0) translateY(0)'},
337+
exit: {opacity: 0, transform: 'translateX(100%) translateY(0)'},
338338
transition: transitionSettings,
339339
};
340340

0 commit comments

Comments
 (0)