import React from "react"; import clsx from "clsx"; import Card from "~/components/Card"; import { ChevronRightIcon } from "@heroicons/react/16/solid"; type Props = { items: { title: string; content: string }[] }; function AccordionItem({ title, content }: { title: string; content: string }) { const [open, setOpen] = React.useState(false); return (
setOpen(x => !x)}>
{title}
{content}
); } export default function Accordion({ items }: Props) { return (
{items.map(({ title, content }) => (
))}
); }