frontPanel/src/ui_kit/Header/NavMenuItem.tsx

33 lines
637 B
TypeScript
Raw Normal View History

2022-12-09 11:48:15 +00:00
import { Link, Typography, useTheme } from "@mui/material";
interface Props {
2023-12-31 02:53:25 +00:00
text: string;
isActive?: boolean;
onClick?: () => void;
href?: string;
2022-12-09 11:48:15 +00:00
}
2023-12-31 02:53:25 +00:00
export default function NavMenuItem({
href,
onClick,
text,
isActive = false,
}: Props) {
const theme = useTheme();
2022-12-09 11:48:15 +00:00
2023-12-31 02:53:25 +00:00
return (
<Link href={href} underline="none" onClick={onClick}>
я есть навбар меню итем
2023-12-31 02:53:25 +00:00
<Typography
color={isActive ? theme.palette.brightPurple.main : undefined}
variant="body2"
sx={{
whiteSpace: "nowrap",
}}
>
{text}
</Typography>
</Link>
);
}