Skip to content

Commit

Permalink
Merge pull request #95 from Eldemarkki/fix-textloop-flashing
Browse files Browse the repository at this point in the history
Fix TextLoop flashing when cycling
  • Loading branch information
Esinko authored Apr 14, 2023
2 parents a8251cc + 486ee33 commit a7e205f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/TextLoop/TextLoop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const TextLoopElement = styled.span<{
stayTimeRatio: number;
duration: number;
}>`
animation: ${props => TextLoopAnimation(props.stayTimeRatio)} ${(props) => props.duration}s ease-in-out;
animation: ${props => TextLoopAnimation(props.stayTimeRatio)} ${(props) => props.duration}s ease-in-out infinite;
`

type TextLoopProps = PropsWithChildren<{
Expand All @@ -42,7 +42,7 @@ export const TextLoop = ({ children, duration = 3, stayTimeRatio = 95 }: TextLoo
key={index}
duration={duration}
stayTimeRatio={stayTimeRatio}
onAnimationEnd={incrementIndex}
onAnimationIteration={incrementIndex}
>
{childrenArray[index]}
</TextLoopElement>;
Expand Down

1 comment on commit a7e205f

@vercel
Copy link

@vercel vercel bot commented on a7e205f Apr 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.