import type React from "react"; import type { HTMLProps } from "react"; import { FiSave } from "react-icons/fi"; import { Button } from "@components/Button.js"; import { ArrowPathIcon, ArrowUturnLeftIcon, ChevronRightIcon, HomeIcon, } from "@heroicons/react/24/outline"; export interface FormProps extends HTMLProps { title: string; breadcrumbs: string[]; reset: () => void; onSubmit: (event: React.FormEvent) => Promise; loading: boolean; dirty: boolean; } export const Form = ({ title, breadcrumbs, reset, loading, dirty, children, onSubmit, ...props }: FormProps): JSX.Element => { return ( // eslint-disable-next-line @typescript-eslint/no-misused-promises
{loading && (
)}
  1. {breadcrumbs.map((breadcrumb, index) => (
  2. {breadcrumb}
  3. ))}

{title}

{children}
); };