front-hub/src/components/NavMenuItem.tsx

25 lines
596 B
TypeScript
Raw Normal View History

2022-11-17 12:25:23 +00:00
import { Link, Typography, useTheme } from "@mui/material";
interface Props {
text: string;
isActive?: boolean;
}
export default function NavMenuItem({ text, isActive = false }: Props) {
2022-11-18 16:51:10 +00:00
const theme = useTheme();
2022-11-17 12:25:23 +00:00
return (
<Link href="#" underline="none">
2022-11-18 16:51:10 +00:00
<Typography
color={isActive ? theme.palette.custom.brightPurple.main : undefined}
variant="medium"
sx={{
whiteSpace: "nowrap",
}}
>
2022-11-17 12:25:23 +00:00
{text}
</Typography>
</Link>
);
}