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>
|
||||||
|
)
|
||||||
|
}
|
18
src/components/searchBar.module.css
Normal file
18
src/components/searchBar.module.css
Normal 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;
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue