Files
impersonator/src/components/Navbar.tsx

51 lines
1.3 KiB
TypeScript
Raw Normal View History

2022-01-17 05:18:10 +05:30
import {
Button,
useColorMode,
Flex,
Heading,
Spacer,
Box,
Link,
} from "@chakra-ui/react";
2021-08-22 03:44:44 +05:30
import { SunIcon, MoonIcon } from "@chakra-ui/icons";
2022-01-17 05:18:10 +05:30
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faGithub } from "@fortawesome/free-brands-svg-icons";
2021-08-22 03:44:44 +05:30
function Navbar() {
const { colorMode, toggleColorMode } = useColorMode();
const underlineColor = { light: "gray.500", dark: "gray.400" };
return (
<Flex
py="4"
px={["2", "4", "10", "10"]}
borderBottom="2px"
borderBottomColor={underlineColor[colorMode]}
>
<Spacer flex="1" />
2022-10-11 13:19:53 +05:30
<Heading
maxW={["302px", "4xl", "4xl", "4xl"]}
2022-10-11 13:24:30 +05:30
fontSize={{ base: "2xl", sm: "3xl", md: "4xl" }}
2022-10-11 13:19:53 +05:30
pr="2rem"
>
2021-08-22 03:44:44 +05:30
🎭 Impersonator 🕵
</Heading>
2022-01-17 05:18:10 +05:30
<Flex flex="1" justifyContent="flex-end" alignItems={"center"}>
2021-08-22 03:44:44 +05:30
<Button onClick={toggleColorMode} rounded="full" h="40px" w="40px">
{colorMode === "light" ? <MoonIcon /> : <SunIcon />}
</Button>
2022-01-17 05:18:10 +05:30
<Box pl="1rem">
<Link
href={"https://github.com/apoorvlathey/impersonator"}
isExternal
>
<FontAwesomeIcon icon={faGithub} size="2x" />
</Link>
</Box>
2021-08-22 03:44:44 +05:30
</Flex>
</Flex>
);
}
export default Navbar;