mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-11-08 17:12:25 +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
|
||||
className={styles.container}
|
||||
style={{
|
||||
// TODO: inverse for RTL language
|
||||
WebkitTransform: `translateX(-${interpolatingStyle.transform}%)`,
|
||||
transform: `translateX(-${interpolatingStyle.transform}%)`,
|
||||
// @ts-ignore see https://stackoverflow.com/a/52013197/5184751
|
||||
'--transition-progress': `${interpolatingStyle.transform}%`,
|
||||
}}
|
||||
>
|
||||
{React.Children.map(children, (child, index) => (
|
||||
|
@ -1,5 +1,11 @@
|
||||
.container {
|
||||
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user