2024-02-22 17:26:07 +08:00
|
|
|
import React from 'react';
|
|
|
|
import {useShopStore} from "./shop_store";
|
|
|
|
|
|
|
|
export function SearchBar() {
|
|
|
|
const search_bar_value = useShopStore((state) => state.search_bar_value);
|
|
|
|
const updateSearchBar = useShopStore((state) => state.updateSearchBar);
|
|
|
|
return (
|
2024-02-23 15:28:39 +08:00
|
|
|
<div className="search-backlog form-outline">
|
2024-02-22 17:26:07 +08:00
|
|
|
<input type="search"
|
|
|
|
id="search_bar"
|
2024-02-23 15:28:39 +08:00
|
|
|
className="search-backlog-input form-control"
|
2024-02-22 17:26:07 +08:00
|
|
|
placeholder="Search through cards"
|
|
|
|
value={search_bar_value}
|
|
|
|
onChange={event => updateSearchBar(event.target.value)}
|
|
|
|
aria-label="Search"/>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|