"use client"; import { Children, type ReactNode } from "react"; import { AnimatePresence, motion, type Transition, type Variants, } from "motion/react"; type TransitionPanelProps = { activeIndex: number; children: ReactNode; variants: Variants; transition?: Transition; custom?: number; }; export function TransitionPanel({ activeIndex, children, variants, transition, custom, }: TransitionPanelProps) { const paneller = Children.toArray(children); return (
{paneller[activeIndex]}
); }