forked from mrwyndham/fastpocket
62 lines
2.0 KiB
TypeScript
62 lines
2.0 KiB
TypeScript
import Link from "next/link";
|
|
import React from "react";
|
|
|
|
const FAQQuestion = ({
|
|
title,
|
|
children,
|
|
}: {
|
|
title: string;
|
|
children: React.ReactNode;
|
|
}) => {
|
|
return (
|
|
<div
|
|
className="hs-accordion hs-accordion-active:bg-gray-100 rounded-xl p-6 dark:hs-accordion-active:bg-white/[.05] active"
|
|
id="hs-basic-with-title-and-arrow-stretched-heading-one"
|
|
>
|
|
<button
|
|
className="hs-accordion-toggle group pb-3 inline-flex items-center justify-between gap-x-3 w-full md:text-lg font-semibold text-start text-gray-800 rounded-lg transition hover:text-gray-500 dark:text-gray-200 dark:hover:text-gray-400 dark:focus:outline-none"
|
|
aria-controls="hs-basic-with-title-and-arrow-stretched-collapse-one"
|
|
>
|
|
{title}
|
|
<svg
|
|
className="hs-accordion-active:hidden block flex-shrink-0 w-5 h-5 text-gray-600 group-hover:text-gray-500 dark:text-gray-400"
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
width="24"
|
|
height="24"
|
|
viewBox="0 0 24 24"
|
|
fill="none"
|
|
stroke="currentColor"
|
|
strokeWidth="2"
|
|
strokeLinecap="round"
|
|
strokeLinejoin="round"
|
|
>
|
|
<path d="m6 9 6 6 6-6" />
|
|
</svg>
|
|
<svg
|
|
className="hs-accordion-active:block hidden flex-shrink-0 w-5 h-5 text-gray-600 group-hover:text-gray-500 dark:text-gray-400"
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
width="24"
|
|
height="24"
|
|
viewBox="0 0 24 24"
|
|
fill="none"
|
|
stroke="currentColor"
|
|
strokeWidth="2"
|
|
strokeLinecap="round"
|
|
strokeLinejoin="round"
|
|
>
|
|
<path d="m18 15-6-6-6 6" />
|
|
</svg>
|
|
</button>
|
|
<div
|
|
id="hs-basic-with-title-and-arrow-stretched-collapse-one"
|
|
className="hs-accordion-content w-full overflow-hidden transition-[height] duration-300"
|
|
aria-labelledby="hs-basic-with-title-and-arrow-stretched-heading-one"
|
|
>
|
|
{children}
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default FAQQuestion;
|