import { FiChevronDown, FiYoutube, FiMusic, FiImage, FiFile } from "react-icons/fi"; import { motion } from "framer-motion"; import { Dispatch, SetStateAction, useState } from "react"; import { IconType } from "react-icons"; const StaggeredDropDown = () => { const [open, setOpen] = useState(false); return (
); }; const Option = ({ text, Icon, setOpen }: { text: string; Icon: IconType; setOpen: Dispatch> }) => { return ( setOpen(false)} className="flex items-center gap-2 w-full p-2 text-xs font-medium whitespace-nowrap rounded-md hover:bg-indigo-100 text-slate-700 hover:text-red-500 transition-colors cursor-pointer" > {text} ); }; export default StaggeredDropDown; const wrapperVariants = { open: { scaleY: 1, transition: { when: "beforeChildren", staggerChildren: 0.1, }, }, closed: { scaleY: 0, transition: { when: "afterChildren", staggerChildren: 0.1, }, }, }; const iconVariants = { open: { rotate: 180 }, closed: { rotate: 0 }, }; const itemVariants = { open: { opacity: 1, y: 0, transition: { when: "beforeChildren", }, }, closed: { opacity: 0, y: -15, transition: { when: "afterChildren", }, }, }; const actionIconVariants = { open: { scale: 1, y: 0 }, closed: { scale: 0, y: -7 }, };