'use client'; import * as React from 'react'; import { RotateCcw, ArrowUpRight } from 'lucide-react'; import { motion, type Transition } from 'motion/react'; const notifications = [ { id: 1, title: 'NPM Install Complete', subtitle: '1,227 packages added!', time: 'just now', count: 2, }, { id: 2, title: 'Build Succeeded', subtitle: 'Build finished in 12.34s', time: '1m 11s', }, { id: 3, title: 'Lint Passed', subtitle: 'No problems found', time: '5m', }, ]; const transition: Transition = { type: 'spring', stiffness: 300, damping: 26, }; const getCardVariants = (i: number) => ({ collapsed: { marginTop: i === 0 ? 0 : -44, scaleX: 1 - i * 0.05, }, expanded: { marginTop: i === 0 ? 0 : 4, scaleX: 1, }, }); const textSwitchTransition: Transition = { duration: 0.22, ease: 'easeInOut', }; const notificationTextVariants = { collapsed: { opacity: 1, y: 0, pointerEvents: 'auto' }, expanded: { opacity: 0, y: -16, pointerEvents: 'none' }, }; const viewAllTextVariants = { collapsed: { opacity: 0, y: 16, pointerEvents: 'none' }, expanded: { opacity: 1, y: 0, pointerEvents: 'auto' }, }; function NotificationList() { return (
{notifications.map((notification, i) => (

{notification.title}

{notification.count && (
{notification.count}
)}
{notification.time}  •  {notification.subtitle}
))}
{notifications.length}
Notifications View all
); } export { NotificationList };