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 (
Полная версия портала доступна с компьютера {/* <Anchor href='/' inherit={true} color='black' underline={false}>Литературные музеи России</Anchor> */} {/* */} { e.preventDefault(); // setActive("#authors"); }} > Авторы } component="a" href="https://bigenc.ru/c/ostrovskii-aleksandr-nikolaevich-c697e2" target="_blank" > Островский } component="a" href="https://bigenc.ru/c/prishvin-mikhail-mikhailovich-893107" target="_blank" > Пришвин } component="a" href="https://bigenc.ru/c/briusov-valerii-iakovlevich-fc6a35" target="_blank" > Брюсов {items}
); }