Addressed the comments.
This commit is contained in:
1 parent
dfdfb4f8b5
commit
145ff8e716
1 file changed
+13
-5
@@ -2,6 +2,7 @@ import Autocomplete from '@mui/material/Autocomplete';
|
|||||||
import TextField from '@mui/material/TextField';
|
import TextField from '@mui/material/TextField';
|
||||||
import Chip from '@mui/material/Chip';
|
import Chip from '@mui/material/Chip';
|
||||||
import Box from '@mui/material/Box';
|
import Box from '@mui/material/Box';
|
||||||
|
import { useTheme } from "@mui/material";
|
||||||
|
|
||||||
const teamMembers = [
|
const teamMembers = [
|
||||||
{ title: 'John Doe'},
|
{ title: 'John Doe'},
|
||||||
@@ -9,9 +10,16 @@ const teamMembers = [
|
|||||||
{ title: 'Alex Johnson'},
|
{ title: 'Alex Johnson'},
|
||||||
];
|
];
|
||||||
|
|
||||||
export default function Search() {
|
/**
|
||||||
|
* @component
|
||||||
|
* @returns {JSX.Element}
|
||||||
|
*/
|
||||||
|
|
||||||
|
export default function Search()
|
||||||
|
{
|
||||||
|
const theme = useTheme();
|
||||||
return (
|
return (
|
||||||
<Box padding={10}> {/* Add padding to the container */}
|
<Box padding={theme.spacing(2)}> {/* Add padding to the container */}
|
||||||
<Autocomplete
|
<Autocomplete
|
||||||
multiple
|
multiple
|
||||||
id="tags-outlined"
|
id="tags-outlined"
|
||||||
@@ -26,12 +34,12 @@ export default function Search() {
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
renderTags={(value, getTagProps) =>
|
renderTags={(value, getTagProps) =>
|
||||||
value.map((option, index) => (
|
value.map((option) => (
|
||||||
<Chip
|
<Chip
|
||||||
key={index}
|
key={option.title}
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
label={option.title}
|
label={option.title}
|
||||||
{...getTagProps({ index })}
|
{...getTagProps({ option })}
|
||||||
/>
|
/>
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user