mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-12-27 23:40:28 +05:30
Fix scroll direction for the SlideMotion component
This commit is contained in:
parent
068115d7c2
commit
bda3994138
@ -77,9 +77,8 @@ class SlideMotion extends React.PureComponent<Props, State> {
|
|||||||
<div
|
<div
|
||||||
className={styles.container}
|
className={styles.container}
|
||||||
style={{
|
style={{
|
||||||
// TODO: inverse for RTL language
|
// @ts-ignore see https://stackoverflow.com/a/52013197/5184751
|
||||||
WebkitTransform: `translateX(-${interpolatingStyle.transform}%)`,
|
'--transition-progress': `${interpolatingStyle.transform}%`,
|
||||||
transform: `translateX(-${interpolatingStyle.transform}%)`,
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{React.Children.map(children, (child, index) => (
|
{React.Children.map(children, (child, index) => (
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
.container {
|
.container {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
transform: translate(var(--transition-progress));
|
||||||
|
|
||||||
|
html[dir='ltr'] & {
|
||||||
|
// noinspection CssInvalidFunction works fine in a browser (:
|
||||||
|
transform: translate(calc(var(--transition-progress) * -1));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
|
Loading…
Reference in New Issue
Block a user