mirror of
https://gitlab.com/MrFry/qmining-page
synced 2025-04-01 20:23:44 +02:00
Added missing searchBar files
This commit is contained in:
parent
c34e2ba2c1
commit
ff13eebfe1
2 changed files with 46 additions and 0 deletions
28
src/components/searchBar.js
Normal file
28
src/components/searchBar.js
Normal 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>
|
||||
)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue