Created
September 26, 2020 21:47
-
-
Save cameronb23/b981fd97f61b33a9622d10fa81bbbd5c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<AnimatedModal isOpen={isOpen} onClose={onClose}> | |
<Formik | |
initialValues={InitialValues} | |
validationSchema={FormSchema} | |
validateOnChange={false} | |
onSubmit={(values) => console.log(values)} | |
> | |
{({ handleSubmit, isSubmitting }) => ( | |
<Form> | |
<ModalHeader>title</ModalHeader> | |
<ModalCloseButton isDisabled={isSubmitting} /> | |
<ModalBody> | |
<Field | |
component={BasicFormInput} | |
name="email" | |
title="User Email" | |
isDisabled={isSubmitting} | |
/> | |
</ModalBody> | |
<ModalFooter> | |
<Button mr={3} onClick={onClose} isDisabled={isSubmitting}> | |
Cancel | |
</Button> | |
<Button | |
onClick={handleSubmit} | |
colorScheme="primary" | |
isLoading={isSubmitting} | |
isDisabled={isSubmitting} | |
> | |
Submit | |
</Button> | |
</ModalFooter> | |
</Form> | |
)} | |
</Formik> | |
</AnimatedModal> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment