forked from kata-containers/kata-containers.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dashboard: Add search box and link to URL
Adds an input form for searching job names. Searches are appended to the URL. Fixes kata-containers#4 Signed-off-by: Anna Finn <[email protected]>
- Loading branch information
Showing
2 changed files
with
125 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
export const SearchForm = ({ handleSearch }) => { | ||
return ( | ||
<div className="flex flex-col items-center md:text-base text-xs"> | ||
<div className="flex min-[1126px]:justify-end justify-center w-full"> | ||
<form className="p-2 bg-gray-700 rounded-md flex flex-row" onSubmit={(e) => handleSearch(e)}> | ||
<div> | ||
<label className="block text-white">Match Mode:</label> | ||
<select name="matchMode" className="px-1 h-fit rounded-lg"> | ||
<option value="or">Match Any</option> | ||
<option value="and">Match All</option> | ||
</select> | ||
</div> | ||
<div className="mx-2"> | ||
<label className="block text-white">Search Text:</label> | ||
<input type="text" name="value" required></input> | ||
</div> | ||
<button type="submit" className="bg-blue-500 text-white px-4 rounded-3xl">Submit</button> | ||
</form> | ||
</div> | ||
</div> | ||
); | ||
}; |
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