import { Button, InputCompOne, Stepper } from '../../shared/index'; import { state } from '../../../utils/states'; import {Formik, Form} from 'formik' import * as Yup from "yup"; type Props = { handleNextStep:(value:{})=>any } const initialValues = { gender: "", address: "", marital_status: "", state: "", email:"", country:"NG" }; // To get the validation schema const validationSchema = Yup.object().shape({ gender: Yup.string() .required("Required"), address: Yup.string() .required("Required"), marital_status: Yup.string() .required("Required"), state: Yup.string() .required("Required"), email: Yup.string() .email("Invalid") .required("Required"), country: Yup.string() .required("Required"), }); export default function DashboardHomeDetail({handleNextStep}:Props) { //FUNCTION TO HANDLE SUBMIT const handleSubmit = (values:any) => { handleNextStep(values) }; return (
{(props)=>(
)}
); } interface SelectOption { loading: boolean; data: {value: string; label: string}[] } const gender: SelectOption = { loading: false, data: [ { value: "", label: "Please Select" }, { value: "male", label: "Male" }, { value: "female", label: "Female" }, { value: "others", label: "Prefer not to say" }, ] } const maritalStatus: SelectOption = { loading: false, data: [ { value: "", label: "Please Select" }, { value: "single", label: "Single" }, { value: "married", label: "Married" }, { value: "divorced", label: "Divorced" }, ] } const country: SelectOption = { loading: false, data: [ { value: "", label: "Please Select" }, { value: "NG", label: "Nigeria" }, ] }