Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import ArrowCircleRightRoundedIcon from '@mui/icons-material/ArrowCircleRightRounded';
import SearchIcon from '@mui/icons-material/Search';
import { Container, IconButton, InputAdornment, TextField } from '@mui/material';
export default function SearchInput() {
const handleSearch = (event: { target: { value: any; }; }) => {
const searchText = event.target.value;
console.log('Search:', searchText);
};
return (
<Container maxWidth="sm" sx={{ justifyContent: "center", textAlign: "center" }}>
<TextField
placeholder="Search"
variant="outlined"
size="small"
onChange={handleSearch}
InputProps={{
startAdornment: (
<InputAdornment position="start">
<SearchIcon />
</InputAdornment>
),
endAdornment: (
<InputAdornment position="end">
<IconButton edge="end" aria-label="start search">
<ArrowCircleRightRoundedIcon />
</IconButton>
</InputAdornment>
),
style: {
borderRadius: '999px',
},
}}
/>
</Container>
);
};