Update input props

This commit is contained in:
Hazem Krimi
2021-04-22 00:00:10 +01:00
parent d0087d52ca
commit f4733e225a
+4 -1
View File
@@ -18,6 +18,7 @@ type InputProps = {
errorMessage?: string; errorMessage?: string;
value: string; value: string;
label?: string; label?: string;
name: string;
type?: 'text' | 'email' | 'password' | 'file' | 'number'; type?: 'text' | 'email' | 'password' | 'file' | 'number';
placeholder?: string; placeholder?: string;
fullWidth?: boolean; fullWidth?: boolean;
@@ -28,6 +29,7 @@ const Input = ({
type = 'text', type = 'text',
color = 'client', color = 'client',
label, label,
name,
placeholder, placeholder,
value, value,
onChange, onChange,
@@ -59,7 +61,8 @@ const Input = ({
type={type} type={type}
value={value} value={value}
onChange={onChange} onChange={onChange}
accept='image/*' name={name}
accept={type === 'file' ? 'image/*' : undefined}
placeholder={placeholder} placeholder={placeholder}
/> />
</div> </div>