import react, {Children, ReactNode} from 'react' import TimelineCardSummary from './TimelineCardSummary' import { FaCaretDown } from 'react-icons/fa' type TimelineCardProps = { children: react.ReactElement>[] } function TimelineCard({ children } : TimelineCardProps) { let titles : ReactNode[] = [] let childrens : ReactNode[] = [] Children.forEach(children, (c) => { if (c.type === TimelineCardSummary) { titles.push(c) } else { childrens.push(c) } }); return (
{titles}
{childrens}
) } export default TimelineCard