import { NotificationsOutlined } from '@mui/icons-material'; import { Avatar, Badge, Box, IconButton, Menu, MenuItem, Tooltip, Typography, } from '@mui/material'; import { useState } from 'react'; function Toolbar({ title, layoutType }) { const [anchorElUser, setAnchorElUser] = useState(null); const [anchorElNotifications, setAnchorElNotifications] = useState(null); console.log(layoutType); switch (layoutType) { case 'desktop': return ( {title} setAnchorElNotifications(e.currentTarget)} sx={{ p: 2 }} > setAnchorElNotifications(null)} > setAnchorElNotifications(null)}> Notificacoes setAnchorElUser(e.currentTarget)} sx={{ p: 0 }} > setAnchorElUser(null)} > setAnchorElUser(null)}> Meu perfil setAnchorElUser(null)}> Sair ); case 'mobile': return ( {title} setAnchorElNotifications(e.currentTarget)} sx={{ p: 2 }} > setAnchorElNotifications(null)} > setAnchorElNotifications(null)}> Notificacoes setAnchorElUser(e.currentTarget)} sx={{ p: 0 }} > setAnchorElUser(null)} > setAnchorElUser(null)}> Meu perfil setAnchorElUser(null)}> Sair ); default: return null; } } const box = { display: 'flex', marginLeft: '230px', height: '130px', justifyContent: 'space-between', alignItems: 'center', padding: '0 70px', borderBottom: '3px solid #CFCFCF', }; const mobileBox = { ...box, marginLeft: 0, height: '70px', padding: '0 10px', justifyContent: 'space-around', }; export default Toolbar;