-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHeader.tsx
41 lines (36 loc) · 1.08 KB
/
Header.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import React, { FC } from "react";
import { Toolbar, Typography, Link, AppBar } from "@material-ui/core";
import useStyles from "./Header.styles";
import Section from "../../../types/section";
import { StaticImage } from "gatsby-plugin-image";
import MainMenu from "../../organisms/MainMenu/MainMenu";
// TODO add storybook
interface HeaderProps {
sections: Section[];
title: string;
}
const Header: FC<HeaderProps> = ({ sections, title }) => {
const classes = useStyles();
return (
<AppBar position="static" className={classes.appbar}>
<Toolbar className={classes.toolbar}>
{/* <Button size="small">Subscribe</Button> */}
<Typography
component="h2"
variant="h5"
color="inherit"
// align="center"
noWrap
className={classes.toolbarTitle}
>
<StaticImage
alt={`${title} Logo`}
src="../../../images/codestar_logo_dark.svg"
/>
</Typography>
<MainMenu sections={sections}></MainMenu>
</Toolbar>
</AppBar>
);
};
export default Header;