'use client' import { motion } from 'framer-motion' interface AnimatedRolesProps { roles: string[] className?: string } export function AnimatedRoles({ roles, className }: AnimatedRolesProps) { const animations = [ { initial: { opacity: 0, x: -20 }, animate: { opacity: 1, x: 0 }, }, { initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, }, { initial: { opacity: 0, x: 20 }, animate: { opacity: 1, x: 0 }, }, { initial: { opacity: 0, scale: 0.8 }, animate: { opacity: 1, scale: 1 }, }, ] return (
{roles.map((role, index) => { const animation = animations[index % animations.length] return ( {role} {index < roles.length - 1 && ( )} ) })}
) }