-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a basic fulltext concept search to the history timeline
- Loading branch information
Showing
12 changed files
with
594 additions
and
379 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { memo } from "react"; | ||
import { useTranslation } from "react-i18next"; | ||
|
||
import { faSearch } from "@fortawesome/free-solid-svg-icons"; | ||
import IconButton from "../button/IconButton"; | ||
import WithTooltip from "../tooltip/WithTooltip"; | ||
import { useTimelineSearch } from "./timelineSearchState"; | ||
|
||
const SearchControl = () => { | ||
const { t } = useTranslation(); | ||
|
||
const { searchVisible, setSearchVisible } = useTimelineSearch(); | ||
const toggleSearchVisible = () => setSearchVisible(!searchVisible); | ||
|
||
return ( | ||
<div className="flex flex-col items-center"> | ||
<WithTooltip text={t("history.search")}> | ||
<IconButton | ||
className="px-[10px] py-2" | ||
active={searchVisible} | ||
onClick={toggleSearchVisible} | ||
icon={faSearch} | ||
/> | ||
</WithTooltip> | ||
</div> | ||
); | ||
}; | ||
|
||
export default memo(SearchControl); |
Oops, something went wrong.