import Iframe from "react-iframe";

export default function KofiDonationWidget({ title, url }) {
  return (
    <div className="pb-6 flex justify-center">
      <details className="rounded-lg p-1 overflow-auto">
        <summary className="p-2 pl-4 pr-4 rounded-lg ring-2 ring-alice-werefox-grey dark:ring-alice-werefox-grey-darker text-md text-center text-alice-werefox-grey-darker dark:text-alice-werefox-grey-lighter bg-alice-werefox-red dark:bg-alice-werefox-red-dark transition hover:bg-alice-werefox-red-light dark:hover:bg-alice-werefox-red-darker">
          <strong>{title}</strong>
        </summary>
        <div className="pt-2">
          <div className="rounded-lg ring-2 ring-alice-werefox-grey dark:ring-alice-werefox-grey-darker overflow-auto">
            <Iframe
              className="rounded-lg w-96 min-w-96"
              url={url}
              height="680"
            ></Iframe>
          </div>
        </div>
      </details>
    </div>
  );
}
