import { Formik, Form } from 'formik'; import React, { ReactNode } from 'react'; import { Button } from "reactstrap"; import * as Yup from 'yup'; interface FormValues { [key: string]: any; } interface FormPageProps { handleSubmit: (values: any) => void initialValues: FormValues; validationSchema: any; title?: string; children: ReactNode; } const FormPage: React.FC = ({ children, handleSubmit, initialValues, validationSchema, title = "Add New Item" }) => { return ( <>

{title}

{formik => (
{children}
)}
); }; export default FormPage;