aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/Header/Header.tsx (renamed from src/lib/Header/Header.js)18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/lib/Header/Header.js b/src/lib/Header/Header.tsx
index 3ade7b3..85dac4b 100644
--- a/src/lib/Header/Header.js
+++ b/src/lib/Header/Header.tsx
@@ -11,7 +11,19 @@ import {
import { makeStyles } from '@material-ui/core/styles';
-const useStyles = makeStyles(theme => ({
+interface PropTypes {
+ logo: {
+ icon: React.ReactNode;
+ title: string;
+ };
+ contents: any;
+ page: string;
+ setPage: any;
+}
+
+
+
+const useStyles = makeStyles((theme: any) => ({
root: {
background: theme.palette.background.elevation2,
color: theme.palette.text.primary,
@@ -34,10 +46,10 @@ const useStyles = makeStyles(theme => ({
}));
-const Header = ({ logo, contents, page, setPage }) => {
+const Header: React.FC<PropTypes> = ({ logo, contents, page, setPage }) => {
const classes = useStyles();
- const handleChange = (event, newPage) => {
+ const handleChange = (event: any, newPage: string) => {
setPage(newPage);
};