source: phonelux-frontend/src/components/FiltersComponents/SearchFieldComponent.js@ dfd5d87

Last change on this file since dfd5d87 was dfd5d87, checked in by Marko <Marko@…>, 22 months ago

Registration logic with confirmation token implemented

  • Property mode set to 100644
File size: 2.3 KB
Line 
1import React, { Component } from 'react'
2import { styled, alpha } from '@mui/material/styles';
3import "./SearchFieldComponent.css"
4import AppBar from '@mui/material/AppBar';
5import Box from '@mui/material/Box';
6import Toolbar from '@mui/material/Toolbar';
7import IconButton from '@mui/material/IconButton';
8import Typography from '@mui/material/Typography';
9import InputBase from '@mui/material/InputBase';
10import Badge from '@mui/material/Badge';
11import MenuItem from '@mui/material/MenuItem';
12import Menu from '@mui/material/Menu';
13import MenuIcon from '@mui/icons-material/Menu';
14import SearchIcon from '@mui/icons-material/Search';
15import AccountCircle from '@mui/icons-material/AccountCircle';
16import MailIcon from '@mui/icons-material/Mail';
17import NotificationsIcon from '@mui/icons-material/Notifications';
18import MoreIcon from '@mui/icons-material/MoreVert';
19
20const Search = styled('div')(({ theme }) => ({
21 position: 'relative',
22 borderRadius: theme.shape.borderRadius,
23 backgroundColor: alpha(theme.palette.common.white, 0.15),
24 '&:hover': {
25 backgroundColor: alpha(theme.palette.common.white, 0.25),
26 },
27 marginRight: theme.spacing(2),
28 marginLeft: 0,
29 width: '100%',
30 [theme.breakpoints.up('sm')]: {
31 marginLeft: theme.spacing(3),
32 width: 'auto',
33 },
34 }));
35
36 const SearchIconWrapper = styled('div')(({ theme }) => ({
37 padding: theme.spacing(0, 2),
38 height: '100%',
39 position: 'absolute',
40 pointerEvents: 'none',
41 display: 'flex',
42 alignItems: 'center',
43 justifyContent: 'center',
44 }));
45
46 const StyledInputBase = styled(InputBase)(({ theme }) => ({
47 color: 'inherit',
48 '& .MuiInputBase-input': {
49 padding: theme.spacing(1, 1, 1, 0),
50 // vertical padding + font size from searchIcon
51 paddingLeft: `calc(1em + ${theme.spacing(4)})`,
52 transition: theme.transitions.create('width'),
53 width: '100%',
54 [theme.breakpoints.up('md')]: {
55 width: '20ch',
56 },
57 },
58 }));
59
60export default class SearchFieldComponent extends Component {
61 render() {
62 return (
63 <Search id="searchfield">
64 <SearchIconWrapper id="iconwrapper">
65 <SearchIcon />
66 </SearchIconWrapper>
67 <StyledInputBase
68 id="search"
69 placeholder="Пребарувај…"
70 inputProps={{ 'aria-label': 'search' }}
71 />
72 </Search>
73 )
74 }
75}
Note: See TracBrowser for help on using the repository browser.