Fix ConversationPanel push/pop for RTL
This commit is contained in:
parent
cea5685aad
commit
5815a37e3a
1 changed files with 2 additions and 4 deletions
|
@ -49,7 +49,6 @@ type AnimationProps<T> = {
|
||||||
};
|
};
|
||||||
|
|
||||||
function doAnimate({
|
function doAnimate({
|
||||||
isRTL,
|
|
||||||
onAnimationStarted,
|
onAnimationStarted,
|
||||||
onAnimationDone,
|
onAnimationDone,
|
||||||
overlay,
|
overlay,
|
||||||
|
@ -74,7 +73,6 @@ function doAnimate({
|
||||||
const animation = animateNode.animate(panel.keyframes, {
|
const animation = animateNode.animate(panel.keyframes, {
|
||||||
...ANIMATION_CONFIG,
|
...ANIMATION_CONFIG,
|
||||||
id: 'panel-animation',
|
id: 'panel-animation',
|
||||||
direction: isRTL ? 'reverse' : 'normal',
|
|
||||||
});
|
});
|
||||||
|
|
||||||
onAnimationStarted();
|
onAnimationStarted();
|
||||||
|
@ -155,7 +153,7 @@ export function ConversationPanel({
|
||||||
ref: animateRef,
|
ref: animateRef,
|
||||||
keyframes: [
|
keyframes: [
|
||||||
{ transform: 'translateX(0%)' },
|
{ transform: 'translateX(0%)' },
|
||||||
{ transform: 'translateX(100%)' },
|
{ transform: isRTL ? 'translateX(-100%)' : 'translateX(100%)' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -178,7 +176,7 @@ export function ConversationPanel({
|
||||||
panel: {
|
panel: {
|
||||||
ref: animateRef,
|
ref: animateRef,
|
||||||
keyframes: [
|
keyframes: [
|
||||||
{ transform: 'translateX(100%)' },
|
{ transform: isRTL ? 'translateX(-100%)' : 'translateX(100%)' },
|
||||||
{ transform: 'translateX(0%)' },
|
{ transform: 'translateX(0%)' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue