-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Task : #216126 Content search API integration
- Loading branch information
1 parent
4965ac3
commit 5069418
Showing
2 changed files
with
120 additions
and
302 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 |
---|---|---|
@@ -1,14 +1,48 @@ | ||
import React from "react"; | ||
import { Button } from '@mui/base/Button'; | ||
import Box from '@mui/material/Box'; | ||
import React, { useState } from "react"; | ||
import { Button } from "@mui/base/Button"; | ||
import Box from "@mui/material/Box"; | ||
|
||
function Search({ onSearch }) { | ||
const [query, setQuery] = useState(""); | ||
|
||
const handleSearchClick = () => { | ||
onSearch(query); | ||
}; | ||
|
||
export default function Search({ }) { | ||
|
||
return ( | ||
<Box style={{display: 'flex', alignItems: 'center', marginBottom: '1rem' }}> | ||
<input type="text" placeholder="Search..." style={{ width:'100%',flex: 1, marginRight: '0.5rem', padding: '0.5rem', borderRadius: '4px', border: '1px solid #CACACA' }} /> | ||
<Button style={{ padding:'11px 9px', borderRadius: '4px', backgroundColor: '#004367', color: 'white', border: '1px', cursor: 'pointer' ,fontSize:'12px'}}>Search</Button> | ||
</Box> | ||
<Box | ||
style={{ display: "flex", alignItems: "center", marginBottom: "1rem" }} | ||
> | ||
<input | ||
type="text" | ||
// value={query} | ||
onChange={(e) => setQuery(e.target.value)} | ||
placeholder="Search..." | ||
style={{ | ||
width: "100%", | ||
flex: 1, | ||
marginRight: "0.5rem", | ||
padding: "0.5rem", | ||
borderRadius: "4px", | ||
border: "1px solid #CACACA", | ||
}} | ||
/> | ||
<Button | ||
onClick={handleSearchClick} | ||
style={{ | ||
padding: "11px 9px", | ||
borderRadius: "4px", | ||
backgroundColor: "#004367", | ||
color: "white", | ||
border: "1px", | ||
cursor: "pointer", | ||
fontSize: "12px", | ||
}} | ||
> | ||
Search | ||
</Button> | ||
</Box> | ||
); | ||
} | ||
|
||
export default Search; |
Oops, something went wrong.