mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-01-27 04:09:46 -06:00
Implemented the search feature.
This commit is contained in:
0
Client/src/Components/Search/index.css
Normal file
0
Client/src/Components/Search/index.css
Normal file
41
Client/src/Components/Search/index.jsx
Normal file
41
Client/src/Components/Search/index.jsx
Normal file
@@ -0,0 +1,41 @@
|
||||
import Autocomplete from '@mui/material/Autocomplete';
|
||||
import TextField from '@mui/material/TextField';
|
||||
import Chip from '@mui/material/Chip';
|
||||
import Box from '@mui/material/Box';
|
||||
|
||||
const teamMembers = [
|
||||
{ title: 'John Doe'},
|
||||
{ title: 'Jane Smith'},
|
||||
{ title: 'Alex Johnson'},
|
||||
];
|
||||
|
||||
export default function Search() {
|
||||
return (
|
||||
<Box padding={10}> {/* Add padding to the container */}
|
||||
<Autocomplete
|
||||
multiple
|
||||
id="tags-outlined"
|
||||
options={teamMembers}
|
||||
getOptionLabel={(option) => option.title}
|
||||
filterSelectedOptions
|
||||
renderInput={(params) => (
|
||||
<TextField
|
||||
{...params}
|
||||
label="Team Members"
|
||||
placeholder="Favorites"
|
||||
/>
|
||||
)}
|
||||
renderTags={(value, getTagProps) =>
|
||||
value.map((option, index) => (
|
||||
<Chip
|
||||
key={index}
|
||||
variant="outlined"
|
||||
label={option.title}
|
||||
{...getTagProps({ index })}
|
||||
/>
|
||||
))
|
||||
}
|
||||
/>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
import DropdownTeamMember from "../../Components/DropdownTeamMember";
|
||||
import Search from "../../Components/Search";
|
||||
import "./index.css";
|
||||
|
||||
const Home = () => {
|
||||
@@ -6,6 +7,7 @@ const Home = () => {
|
||||
<>
|
||||
<div>Home</div>
|
||||
<DropdownTeamMember />
|
||||
<Search />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user