28 lines
621 B
TypeScript
28 lines
621 B
TypeScript
import { Link, Typography, useTheme } from "@mui/material";
|
|
|
|
|
|
interface Props {
|
|
text: string;
|
|
isActive?: boolean;
|
|
}
|
|
|
|
export default function NavMenuItem({ text, isActive = false }: Props) {
|
|
const theme = useTheme();
|
|
|
|
return (
|
|
<Link
|
|
href="#"
|
|
underline="none"
|
|
>
|
|
<Typography
|
|
color={isActive ? theme.palette.brightPurple.main : undefined}
|
|
variant="body2"
|
|
sx={{
|
|
whiteSpace: "nowrap",
|
|
}}
|
|
>
|
|
{text}
|
|
</Typography>
|
|
</Link>
|
|
);
|
|
} |