import { useState } from 'react'; // material-ui import { useTheme, styled } from '@mui/material/styles'; import { Avatar, Box, ButtonBase, Card, Grid, InputAdornment, OutlinedInput, Popper } from '@mui/material'; // third-party import PopupState, { bindPopper, bindToggle } from 'material-ui-popup-state'; // project imports import Transitions from 'ui-component/extended/Transitions'; // assets import { IconAdjustmentsHorizontal, IconSearch, IconX } from '@tabler/icons'; import { shouldForwardProp } from '@mui/system'; // styles const PopperStyle = styled(Popper, { shouldForwardProp })(({ theme }) => ({ zIndex: 1100, width: '99%', top: '-55px !important', padding: '0 12px', [theme.breakpoints.down('sm')]: { padding: '0 10px' } })); const OutlineInputStyle = styled(OutlinedInput, { shouldForwardProp })(({ theme }) => ({ width: 434, marginLeft: 16, paddingLeft: 16, paddingRight: 16, '& input': { background: 'transparent !important', paddingLeft: '4px !important' }, [theme.breakpoints.down('lg')]: { width: 250 }, [theme.breakpoints.down('md')]: { width: '100%', marginLeft: 4, background: theme.palette.mode === 'dark' ? theme.palette.dark[800] : '#fff' } })); const HeaderAvatarStyle = styled(Avatar, { shouldForwardProp })(({ theme }) => ({ ...theme.typography.commonAvatar, ...theme.typography.mediumAvatar, background: theme.palette.mode === 'dark' ? theme.palette.dark.main : theme.palette.secondary.light, color: theme.palette.mode === 'dark' ? theme.palette.secondary.main : theme.palette.secondary.dark, '&:hover': { background: theme.palette.mode === 'dark' ? theme.palette.secondary.main : theme.palette.secondary.dark, color: theme.palette.mode === 'dark' ? theme.palette.secondary.light : theme.palette.secondary.light } })); interface Props { value: string; setValue: (value: string) => void; popupState: any; } // ==============================|| SEARCH INPUT - MOBILE||============================== // const MobileSearch = ({ value, setValue, popupState }: Props) => { const theme = useTheme(); return ( setValue(e.target.value)} placeholder="Search" startAdornment={ } endAdornment={ } aria-describedby="search-helper-text" inputProps={{ 'aria-label': 'weight' }} /> ); }; // ==============================|| SEARCH INPUT ||============================== // const SearchSection = () => { const theme = useTheme(); const [value, setValue] = useState(''); return ( <> {(popupState) => ( <> {({ TransitionProps }) => ( <> )} )} setValue(e.target.value)} placeholder="Search" startAdornment={ } endAdornment={ } aria-describedby="search-helper-text" inputProps={{ 'aria-label': 'weight' }} /> ); }; export default SearchSection;