Skip to content

Commit

Permalink
chore(SLB-405): add checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Luqmaan Essop authored and luqmaanessop committed Jun 5, 2024
1 parent 44d321b commit b62d7f0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/ui/src/components/Molecules/FadeUp.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'use client';
import clsx from 'clsx';
import { motion, useReducedMotion } from 'framer-motion';
import React, { PropsWithChildren } from 'react';

Expand All @@ -9,9 +10,13 @@ export function FadeUp({
}: PropsWithChildren<{ yGap: number; className?: string }>) {
const reducedMotion = useReducedMotion();

console.log('reducedMotion:', reducedMotion);
return (
<motion.div
className={className}
className={clsx(
className,
reducedMotion ? 'reducedMotion: On' : 'reducedMotion: Off',
)}
transition={{ duration: 0.8 }}
style={{ opacity: reducedMotion ? 1 : 0, y: reducedMotion ? 0 : yGap }}
viewport={{ once: true }}
Expand Down

0 comments on commit b62d7f0

Please sign in to comment.