fix(core-blocks): slide box styles on small creen

This commit is contained in:
Wroud
2022-06-04 15:43:41 +03:00
parent 2fd3243286
commit a292cbb2e6
2 changed files with 8 additions and 3 deletions
@@ -30,7 +30,7 @@ export const SlideBox: React.FC<Props> = function SlideBox({ children, className
div.addEventListener('scroll', handleScroll);
}
return () => {
return () => {
if (div) {
div.removeEventListener('scroll', handleScroll);
}
@@ -20,10 +20,11 @@ export const slideBoxStyles = css`
vertical-align:top;
white-space: normal;
transition: transform cubic-bezier(0.4, 0.0, 0.2, 1) 0.6s;
transform: translateX(calc(-100% + 120px));
transform: translateX(-100%);
&:first-child {
width: calc(100% - 120px);
transition: width cubic-bezier(0.4, 0.0, 0.2, 1) 0.6s;
width: 100%;
}
}
@@ -52,6 +53,10 @@ export const slideBoxStyles = css`
}
& SlideElement {
transform: translateX(0%);
&:first-child {
width: calc(100% - 120px);
}
}
}
}