2021-03-16 01:33:19 +01:00
|
|
|
import { FC } from "react";
|
2021-04-08 22:28:45 +02:00
|
|
|
import NextLink from "next/link";
|
2021-03-16 23:58:12 +01:00
|
|
|
import { Flex, HStack, IconButton, Link, useColorModeValue } from "@chakra-ui/react";
|
2021-03-16 01:33:19 +01:00
|
|
|
import { FaGithub } from "react-icons/fa";
|
|
|
|
|
import Image from "next/image";
|
|
|
|
|
import ColorModeToggler from "./ColorModeToggler";
|
|
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
|
[key: string]: any
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const Header: FC<Props> = (props) => (
|
|
|
|
|
<Flex
|
2021-03-17 21:30:47 +01:00
|
|
|
as="header"
|
2021-03-16 01:33:19 +01:00
|
|
|
px={1}
|
|
|
|
|
py={3}
|
|
|
|
|
justify="space-around"
|
|
|
|
|
align="center"
|
|
|
|
|
bgColor={useColorModeValue("lingva.100", "lingva.900")}
|
|
|
|
|
w="full"
|
|
|
|
|
{...props}
|
|
|
|
|
>
|
2021-04-08 22:28:45 +02:00
|
|
|
<NextLink href="/" passHref={true}>
|
|
|
|
|
<Link display="flex">
|
|
|
|
|
<Image
|
|
|
|
|
src={useColorModeValue("/banner_light.svg", "/banner_dark.svg")}
|
|
|
|
|
alt="Logo"
|
|
|
|
|
width={110}
|
|
|
|
|
height={64}
|
|
|
|
|
/>
|
|
|
|
|
</Link>
|
|
|
|
|
</NextLink>
|
2021-03-16 13:02:23 +01:00
|
|
|
<HStack spacing={3}>
|
|
|
|
|
<ColorModeToggler
|
|
|
|
|
variant={useColorModeValue("outline", "solid")}
|
|
|
|
|
/>
|
2021-03-16 01:33:19 +01:00
|
|
|
<IconButton
|
|
|
|
|
as={Link}
|
|
|
|
|
href="https://github.com/TheDavidDelta/lingva-translate"
|
|
|
|
|
isExternal={true}
|
|
|
|
|
aria-label="GitHub"
|
|
|
|
|
icon={<FaGithub />}
|
|
|
|
|
colorScheme="lingva"
|
2021-03-16 13:02:23 +01:00
|
|
|
variant={useColorModeValue("outline", "solid")}
|
2021-03-16 01:33:19 +01:00
|
|
|
/>
|
|
|
|
|
</HStack>
|
|
|
|
|
</Flex>
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
export default Header;
|