Files
breakpilot-core/pitch-deck/components/ui/FadeInView.tsx
Benjamin Boenisch f2a24d7341 feat: add pitch-deck service to core infrastructure
Migrated pitch-deck from breakpilot-pwa to breakpilot-core.
Container: bp-core-pitch-deck on port 3012.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 19:44:27 +01:00

40 lines
793 B
TypeScript

'use client'
import { motion } from 'framer-motion'
import { ReactNode } from 'react'
interface FadeInViewProps {
children: ReactNode
className?: string
delay?: number
direction?: 'up' | 'down' | 'left' | 'right' | 'none'
duration?: number
}
export default function FadeInView({
children,
className = '',
delay = 0,
direction = 'up',
duration = 0.6,
}: FadeInViewProps) {
const directionMap = {
up: { y: 30 },
down: { y: -30 },
left: { x: 30 },
right: { x: -30 },
none: {},
}
return (
<motion.div
initial={{ opacity: 0, ...directionMap[direction] }}
animate={{ opacity: 1, x: 0, y: 0 }}
transition={{ duration, delay, ease: [0.22, 1, 0.36, 1] }}
className={className}
>
{children}
</motion.div>
)
}