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;
value: string;
label?: string;
name: string;
type?: 'text' | 'email' | 'password' | 'file' | 'number';
placeholder?: string;
fullWidth?: boolean;
@@ -28,6 +29,7 @@ const Input = ({
type = 'text',
color = 'client',
label,
name,
placeholder,
value,
onChange,
@@ -59,7 +61,8 @@ const Input = ({
type={type}
value={value}
onChange={onChange}
accept='image/*'
name={name}
accept={type === 'file' ? 'image/*' : undefined}
placeholder={placeholder}
/>
</div>