From 87f882558a4070fbadcb68199b5fa64a3c62799d Mon Sep 17 00:00:00 2001 From: Sanskar Date: Fri, 19 Jul 2024 21:51:34 +0545 Subject: [PATCH] Custom Text Input --- nepalingo-web/src/components/CustomTextInput.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/nepalingo-web/src/components/CustomTextInput.tsx b/nepalingo-web/src/components/CustomTextInput.tsx index 12a95b2..26fbca9 100644 --- a/nepalingo-web/src/components/CustomTextInput.tsx +++ b/nepalingo-web/src/components/CustomTextInput.tsx @@ -7,7 +7,6 @@ import { interface TextInputProps extends React.InputHTMLAttributes { label?: string; value?: string; - onChangeText?: (text: string) => void; iconProps: FontAwesomeIconProps; placeholder?: string; error?: string; @@ -17,14 +16,14 @@ interface TextInputProps extends React.InputHTMLAttributes { } export const CustomTextInput = ({ label, - onChangeText, iconProps, placeholder, name, inputType, className, + error, + ...props }: TextInputProps) => { - const inputRef = useRef(null); return (
{label && ( @@ -38,13 +37,12 @@ export const CustomTextInput = ({
onChangeText && onChangeText(e.target.value)} + {...props} />