Complete search component

This commit is contained in:
Hazem Krimi
2021-04-21 00:26:22 +01:00
parent ed5ec0f5e2
commit 1fec8671f1
3 changed files with 222 additions and 4 deletions
+39 -2
View File
@@ -1,7 +1,44 @@
import { Wrapper } from './styles';
import { Search as SearchIcon } from '../../assets';
const Search = () => {
return <Wrapper></Wrapper>;
type SearchProps = {
className?: string;
color?:
| 'client'
| 'productOwner'
| 'developer'
| 'admin'
| 'success'
| 'warning'
| 'error'
| 'black'
| 'white';
value: string;
fullWidth?: boolean;
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
};
const Search = ({
color = 'client',
value,
onChange,
...props
}: SearchProps) => {
return (
<Wrapper color={color} {...props}>
<div className='search'>
<span className='icon left'>
<SearchIcon />
</span>
<input
type='text'
value={value}
onChange={onChange}
placeholder='Search'
/>
</div>
</Wrapper>
);
};
export default Search;