Start working on input component

This commit is contained in:
Hazem Krimi
2021-04-14 23:08:13 +01:00
parent 3130485051
commit bf30b856bc
3 changed files with 105 additions and 5 deletions
+21 -2
View File
@@ -1,7 +1,26 @@
import { Wrapper } from './styles';
const Input = () => {
return <Wrapper></Wrapper>;
type InputProps = {
className?: string;
color?: 'client' | 'productOwner' | 'developer' | 'admin' | string;
error?: boolean;
errorMessage?: string;
value: string;
label: string;
type: 'text' | 'email' | 'password' | 'file' | 'number';
placeholder?: string;
fullWidth?: boolean;
multiline?: boolean;
iconLeft?: React.SVGProps<SVGSVGElement>;
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
};
const Input = ({ type, value, ...props }: InputProps) => {
return (
<Wrapper {...props}>
<input type={type} value={value} />
</Wrapper>
);
};
export default Input;