import React, { useState } from 'react'; import { cn } from '@/utils/cn'; import { ChevronUp } from 'lucide-react'; import AnimateHeight from 'react-animate-height'; import { Button } from '../ui/button'; interface ExpandableListItemProps { children: React.ReactNode; content: React.ReactNode; title: string; image?: React.ReactNode; initialOpen?: boolean; className?: string; } export function ExpandableListItem({ title, content, image, initialOpen = false, children, className, }: ExpandableListItemProps) { const [open, setOpen] = useState(initialOpen ?? false); return (
{image}
{title} {!!content && (
{content}
)}
{children}
); }