You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

NavItem.jsx 994B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import { ListItemButton, ListItemText, Typography } from '@mui/material';
  2. import Link from 'next/link';
  3. export const NavItemMobile = ({ toggleDrawer, name, url }) => {
  4. return (
  5. <ListItemButton>
  6. <Link href={url}>
  7. <ListItemText
  8. onClick={toggleDrawer(false)}
  9. primary={
  10. <Typography
  11. sx={{ fontSize: '24px' }}
  12. style={{ color: 'primary.main' }}
  13. >
  14. {name}
  15. </Typography>
  16. }
  17. />
  18. </Link>
  19. </ListItemButton>
  20. );
  21. };
  22. export const NavItemDesktop = ({ url, router, name }) => {
  23. return (
  24. <Link href={url}>
  25. <Typography
  26. textAlign="center"
  27. sx={{
  28. mx: 'auto',
  29. fontSize: { md: 20, lg: 20 },
  30. fontWeight: 500,
  31. color: router.pathname === '/' ? 'white' : 'primary.main',
  32. textDecoration: 'none',
  33. cursor: 'pointer',
  34. }}
  35. >
  36. {name}
  37. </Typography>
  38. </Link>
  39. );
  40. };