mirror of
https://gitlab.com/MrFry/qmining-page
synced 2025-04-01 20:23:44 +02:00
28 lines
622 B
JavaScript
28 lines
622 B
JavaScript
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>
|
|
)
|
|
}
|