import { useState } from "react";
import {
createStyles,
Header,
Container,
Group,
Burger,
rem,
Image,
Menu,
Dialog,
} from "@mantine/core";
import { IconExternalLink } from "@tabler/icons-react";
import { useDisclosure } from "@mantine/hooks";
import logo from "./assets/logos/logo-text.png";
const useStyles = createStyles((theme) => ({
header: {
display: "flex",
justifyContent: "space-between",
alignItems: "center",
height: "100%",
},
links: {
[theme.fn.smallerThan("xs")]: {
display: "none",
},
},
warning: {
[theme.fn.largerThan("md")]: {
display: "none",
},
},
burger: {
// [theme.fn.largerThan("xs")]: {
display: "none",
// }
},
link: {
display: "block",
lineHeight: 1,
padding: `${rem(8)} ${rem(12)}`,
borderRadius: theme.radius.sm,
textDecoration: "none",
color:
theme.colorScheme === "dark"
? theme.colors.dark[0]
: theme.colors.gray[7],
fontSize: theme.fontSizes.md,
fontWeight: 700,
"&:hover": {
backgroundColor: theme.colors.gray[0],
color: "#eb7b1a",
},
},
linkActive: {
backgroundColor: "#ffb84d",
"&:hover": {
backgroundColor: "#ffb84d",
color: "#eb7b1a",
},
},
}));
interface HeaderSimpleProps {
links: { link: string; label: string }[];
}
export function HeaderSimple({ links }: HeaderSimpleProps) {
// const [opened, { toggle }] = useDisclosure(false);
const [opened, { toggle, close }] = useDisclosure(true);
const [active, setActive] = useState("");
const { classes, cx } = useStyles();
const items = links.slice(1).map(
(
link // for custom authors link
) => (
{
// setActive(link.link);
// }}
>
{link.label}
)
);
return (
{/* Литературные музеи России */}
{/* */}
{items}
);
}