Skip to content

Commit

Permalink
docs: optimize animations
Browse files Browse the repository at this point in the history
  • Loading branch information
Pagebakers committed Aug 6, 2022
1 parent 8e965c9 commit 7739c14
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apps/website/src/components/background-gradient-radial.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const BackgroundGradientRadial = ({
width="100%"
zIndex="1"
opacity="0"
animation={animate && `${glow} 4s ease-out 0.2s`}
animation={animate && `${glow} 4s ease-out`}
sx={{ animationFillMode: 'forwards' }}
{...props}
>
Expand Down
3 changes: 3 additions & 0 deletions apps/website/src/components/motion/fall-in-place.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,20 @@ export const FallInPlace = ({
delay = 0.2,
translateY = '20px',
initialInView,
threshold,
onChange,
...rest
}: MotionBoxProps & {
delay?: number
initialInView?: boolean
threshold?: number
translateY?: string
onChange?: IntersectionOptions['onChange']
}) => {
const { ref, inView } = useInView({
triggerOnce: true,
initialInView,
threshold,
onChange,
})

Expand Down
1 change: 1 addition & 0 deletions apps/website/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ const Home = () => {
>
<FallInPlace
delay={1.4}
threshold={0.2}
onChange={(inView) => setAnimate(inView)}
>
<AspectRatio ratio={1100 / 698}>
Expand Down

0 comments on commit 7739c14

Please sign in to comment.