mirror of
https://github.com/hazemKrimi/crimson-quirks-ui.git
synced 2026-05-01 18:20:28 +00:00
Update input component
This commit is contained in:
@@ -17,7 +17,7 @@ type InputProps = {
|
|||||||
error?: boolean;
|
error?: boolean;
|
||||||
errorMessage?: string;
|
errorMessage?: string;
|
||||||
value: string;
|
value: string;
|
||||||
label: string;
|
label?: string;
|
||||||
type?: 'text' | 'email' | 'password' | 'file' | 'number';
|
type?: 'text' | 'email' | 'password' | 'file' | 'number';
|
||||||
placeholder?: string;
|
placeholder?: string;
|
||||||
fullWidth?: boolean;
|
fullWidth?: boolean;
|
||||||
@@ -28,6 +28,7 @@ const Input = ({
|
|||||||
type = 'text',
|
type = 'text',
|
||||||
color = 'client',
|
color = 'client',
|
||||||
label,
|
label,
|
||||||
|
placeholder,
|
||||||
value,
|
value,
|
||||||
onChange,
|
onChange,
|
||||||
error,
|
error,
|
||||||
@@ -54,7 +55,13 @@ const Input = ({
|
|||||||
<Upload />
|
<Upload />
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
<input type={type} value={value} onChange={onChange} accept='image/*' />
|
<input
|
||||||
|
type={type}
|
||||||
|
value={value}
|
||||||
|
onChange={onChange}
|
||||||
|
accept='image/*'
|
||||||
|
placeholder={placeholder}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</Wrapper>
|
</Wrapper>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ type WrapperProps = {
|
|||||||
error?: boolean;
|
error?: boolean;
|
||||||
errorMessage?: string;
|
errorMessage?: string;
|
||||||
type?: 'text' | 'email' | 'password' | 'file' | 'number';
|
type?: 'text' | 'email' | 'password' | 'file' | 'number';
|
||||||
label: string;
|
label?: string;
|
||||||
fullWidth?: boolean;
|
fullWidth?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user