Skip to content

Commit

Permalink
feat(popper): using fiesta speed for popper animation
Browse files Browse the repository at this point in the history
  • Loading branch information
mateoguzmana committed Aug 21, 2022
1 parent 2e5f197 commit 53591a7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/components/Popper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { screenWidth } from '../constants/dimensions';
import { shuffleArray } from '../utils/array';
import { colorsFromTheme } from '../utils/colors';
import { FiestaThemes } from '../constants/theming';
import { FiestaSpeed, fiestaSpeedConfig } from '../constants/speed';

interface RenderItemParams {
x: number;
Expand Down Expand Up @@ -46,9 +47,11 @@ function Popper({

const changeItemPosition = useCallback(
() =>
runSpring(containerYPosition, -screenHeight, {
stiffness: 0.5,
}),
runSpring(
containerYPosition,
-screenHeight,
fiestaSpeedConfig[FiestaSpeed.Normal]
),
[containerYPosition]
);

Expand Down

0 comments on commit 53591a7

Please sign in to comment.