Skip to content

Commit

Permalink
style(SLB-405): fix onload animation
Browse files Browse the repository at this point in the history
  • Loading branch information
Luqmaan Essop committed May 30, 2024
1 parent 1d1ce5f commit 324df6f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/ui/src/components/Molecules/FadeUp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ export function FadeUp({
className,
}: PropsWithChildren<{ yGap: number; className?: string }>) {
const reducedMotion = useReducedMotion();

console.log("reducedMotion:", reducedMotion)

return (
<motion.div
className={className}
transition={{ duration: 0.8 }}
initial={{ opacity: reducedMotion ? 1 : 0, y: reducedMotion ? 0 : yGap }}
style={{ opacity: reducedMotion ? 1 : 0, y: reducedMotion ? 0 : yGap }}
whileInView={{ opacity: 1, y: 0 }}
>
{children}
Expand Down

0 comments on commit 324df6f

Please sign in to comment.