From 5ab01e5a93ccd8f88642192482b3590b0a553266 Mon Sep 17 00:00:00 2001 From: luislaya Date: Tue, 15 Feb 2022 11:59:24 -0600 Subject: [PATCH] First commit --- .../InputField/ContactInputField.js | 52 +++++++ web/components/InputField/InputPopover.js | 29 ++++ web/config/db/migrations.js | 5 + web/pages/api/contacts/index.js | 18 +++ web/pages/contact.js | 140 ++++++++++++++++++ 5 files changed, 244 insertions(+) create mode 100644 web/components/InputField/ContactInputField.js create mode 100644 web/components/InputField/InputPopover.js create mode 100644 web/pages/api/contacts/index.js create mode 100644 web/pages/contact.js diff --git a/web/components/InputField/ContactInputField.js b/web/components/InputField/ContactInputField.js new file mode 100644 index 0000000..2395526 --- /dev/null +++ b/web/components/InputField/ContactInputField.js @@ -0,0 +1,52 @@ +import React from 'react'; +import { Field } from 'formik'; +import { + FormControl, + FormLabel, + FormErrorMessage, + Input, + Textarea, + IconButton, +} from '@chakra-ui/react'; +import InputPopover from './InputPopover'; +import { RiErrorWarningFill } from 'react-icons/ri'; + +function ContactInputField({ type, label, name, error, touched, tag }) { + return ( + + {({ field }) => ( + + + {label} + {error && touched ? ( + {error} } + trigger={ + + + + } + /> + ) : ( + '' + )} + + {tag === 'Input' ? ( + + ) : ( +