add search comp

This commit is contained in:
madarsbiss
2021-09-21 21:54:24 +03:00
parent 9b359bd358
commit e4dcd3183b
4 changed files with 38 additions and 27 deletions

17
components/Search.js Normal file
View File

@@ -0,0 +1,17 @@
import styles from "./Search.module.css";
const Search = ({ placeHolder, value, onFocus, onChange, onKeyDown }) => {
return (
<input
className={styles.searchInput}
type="text"
placeholder={placeHolder}
value={value}
onFocus={onFocus}
onChange={onChange}
onKeyDown={onKeyDown}
/>
);
};
export default Search;

View File

@@ -0,0 +1,18 @@
.searchInput {
margin-bottom: 20px;
height: 40px;
border: none;
padding: 0 10px;
color: #303030;
font-size: 20px;
text-align: right;
border-radius: 10px;
font-family: "Varela Round", sans-serif;
font-size: 18px;
}
@media only screen and (max-width: 520px) {
.searchInput {
width: 100%;
}
}