Fix ConversationPanel push/pop for RTL

This commit is contained in:
ayumi-signal 2023-11-22 08:20:39 -08:00 committed by GitHub
parent cea5685aad
commit 5815a37e3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -49,7 +49,6 @@ type AnimationProps<T> = {
};
function doAnimate({
isRTL,
onAnimationStarted,
onAnimationDone,
overlay,
@ -74,7 +73,6 @@ function doAnimate({
const animation = animateNode.animate(panel.keyframes, {
...ANIMATION_CONFIG,
id: 'panel-animation',
direction: isRTL ? 'reverse' : 'normal',
});
onAnimationStarted();
@ -155,7 +153,7 @@ export function ConversationPanel({
ref: animateRef,
keyframes: [
{ transform: 'translateX(0%)' },
{ transform: 'translateX(100%)' },
{ transform: isRTL ? 'translateX(-100%)' : 'translateX(100%)' },
],
},
});
@ -178,7 +176,7 @@ export function ConversationPanel({
panel: {
ref: animateRef,
keyframes: [
{ transform: 'translateX(100%)' },
{ transform: isRTL ? 'translateX(-100%)' : 'translateX(100%)' },
{ transform: 'translateX(0%)' },
],
},