summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/Input.tsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/components/Input.tsx b/src/components/Input.tsx
index 69b97a2..896a974 100644
--- a/src/components/Input.tsx
+++ b/src/components/Input.tsx
@@ -1,10 +1,11 @@
import React from 'react';
+import { Field } from 'formik';
export interface Props extends React.InputHTMLAttributes<HTMLInputElement> {
label?: string;
}
-const Input: React.FC<Props> = ({ label, ...props }) => {
+const InputBase: React.FC<Props> = ({ label, ...props }) => {
return (
<div className="m-2 mb-4 flex flex-col">
<label htmlFor={props?.name} className="mb-1 text-gray-700">{label}</label>
@@ -18,4 +19,6 @@ const Input: React.FC<Props> = ({ label, ...props }) => {
);
};
+const Input: React.FC<Props> = props => <Field {...props} as={InputBase} />;
+
export default Input;