Skip to content

Commit

Permalink
Refactor animation in BlogPostItem component
Browse files Browse the repository at this point in the history
  • Loading branch information
jordienr committed Jun 8, 2024
1 parent 9b409df commit d0fa65d
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions apps/web/app/pub/themes/default/blog-post-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,30 +35,30 @@ export function BlogPostItem({
<span className="text-zinc-700 group-hover:text-zinc-950">
{post.title}
</span>
<AnimatePresence mode="popLayout">
<motion.div
key={rightText}
animate={{
opacity: 1,
y: 0,
}}
initial={{
opacity: 0,
y: 20,
}}
exit={{
opacity: 0,
y: -20,
}}
transition={{
duration: 0.2,
ease: "easeOut",
}}
className="flex gap-2 overflow-hidden text-right font-mono text-xs tracking-tight text-zinc-400"
>
{rightText}
</motion.div>
</AnimatePresence>
{/* <AnimatePresence mode="popLayout"> */}
<motion.div
key={rightText}
animate={{
opacity: 1,
y: 0,
}}
initial={{
opacity: 0,
y: 20,
}}
exit={{
opacity: 0,
y: -20,
}}
transition={{
duration: 0.2,
ease: "easeOut",
}}
className="flex gap-2 overflow-hidden text-right font-mono text-xs tracking-tight text-zinc-400"
>
{rightText}
</motion.div>
{/* </AnimatePresence> */}
</div>
{post.abstract && (
<p className="font-mono text-xs text-zinc-500">{post.abstract}</p>
Expand Down

0 comments on commit d0fa65d

Please sign in to comment.