build(deps): bump react-spring from 8.0.27 to 9.2.3 (#1743)

Bumps [react-spring](https://github.com/pmndrs/react-spring) from 8.0.27 to 9.2.1.
- [Release notes](https://github.com/pmndrs/react-spring/releases)
- [Commits](https://github.com/pmndrs/react-spring/compare/v8.0.27...v9.2.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
Dustin Hildebrandt
2021-06-10 00:46:21 -05:00
committed by GitHub
parent dfe26df6ed
commit 5e160ac6c9
3 changed files with 107 additions and 22 deletions

View File

@@ -89,9 +89,9 @@ const Slider: React.FC<SliderProps> = ({
const [, setX] = useSpring(() => ({
from: { x: 0 },
to: { x: 0 },
onFrame: (props: { x: number }) => {
onChange: (results) => {
if (containerRef.current) {
containerRef.current.scrollLeft = props.x;
containerRef.current.scrollLeft = results.value.x;
}
},
}));
@@ -111,14 +111,12 @@ const Slider: React.FC<SliderProps> = ({
scrollPosition - scrollOffset - visibleItems * cardWidth,
0
);
setX({
setX.start({
from: { x: scrollPosition },
to: {
x: newX,
},
onFrame: (props: { x: number }) => {
to: { x: newX },
onChange: (results) => {
if (containerRef.current) {
containerRef.current.scrollLeft = props.x;
containerRef.current.scrollLeft = results.value.x;
}
},
reset: true,
@@ -135,14 +133,12 @@ const Slider: React.FC<SliderProps> = ({
scrollPosition - scrollOffset + visibleItems * cardWidth,
containerRef.current?.scrollWidth ?? 0 - clientWidth
);
setX({
setX.start({
from: { x: scrollPosition },
to: {
x: newX,
},
onFrame: (props: { x: number }) => {
to: { x: newX },
onChange: (results) => {
if (containerRef.current) {
containerRef.current.scrollLeft = props.x;
containerRef.current.scrollLeft = results.value.x;
}
},
reset: true,