Added missing searchBar files

This commit is contained in:
mrfry 2021-05-04 10:34:36 +02:00
parent c34e2ba2c1
commit ff13eebfe1
2 changed files with 46 additions and 0 deletions

View file

@ -0,0 +1,28 @@
import React from 'react'
import styles from './searchBar.module.css'
export default function SearchBar({ searchTerm, onChange }) {
return (
<center>
<div className={styles.searchContainer}>
<input
placeholder="Kezdj el írni a kereséshez..."
type="text"
value={searchTerm}
onChange={(event) => {
onChange(event.target.value)
}}
/>
<button
onClick={() => {
onChange('')
}}
className={styles.clearButton}
>
</button>
</div>
</center>
)
}

View file

@ -0,0 +1,18 @@
.searchContainer {
width: 100%;
display: flex;
justify-content: center;
margin-left: 10px;
padding-top: 10px;
padding-bottom: 2px;
}
.clearButton {
width: 50px;
background-color: var(--background-color);
color: white;
font-size: 18px;
cursor: pointer;
border: none;
margin-left: 10px;
}