import clsx from "clsx"; import { LazyMotion, m, domAnimation } from "framer-motion"; import { type HTMLProps, type ReactNode, type ComponentProps, useState, } from "react"; import { Button } from "react-aria-components"; type Props = Omit, "title"> & { title?: ReactNode | undefined; questions: { question: ReactNode; answer: ReactNode; }[]; }; export const Faq = ({ title, questions, className, ...props }: Props) => { const [openItem, setOpenItem] = useState(0); return (
{title && (
{title}
)}
{questions.map(({ question, answer }, i) => (
{answer}
))}
); }; type FaqSectionProps = Omit, "children"> & { questions: ComponentProps["questions"]; header: ReactNode; }; export const FaqSection = ({ className, header, questions, ...props }: FaqSectionProps) => (

{header}

);