From 8d8eb2942f73213b175529f47af980889cd080d4 Mon Sep 17 00:00:00 2001 From: Sascha Date: Sat, 20 Mar 2021 10:37:49 +0100 Subject: Add test navbar --- webui/src/components/Header/Header.tsx | 42 ++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'webui/src') diff --git a/webui/src/components/Header/Header.tsx b/webui/src/components/Header/Header.tsx index 3443fcf5..5a968a29 100644 --- a/webui/src/components/Header/Header.tsx +++ b/webui/src/components/Header/Header.tsx @@ -2,6 +2,8 @@ import React from 'react'; import { Link } from 'react-router-dom'; import AppBar from '@material-ui/core/AppBar'; +import Tab from '@material-ui/core/Tab'; +import Tabs from '@material-ui/core/Tabs'; import Toolbar from '@material-ui/core/Toolbar'; import { makeStyles } from '@material-ui/core/styles'; @@ -35,6 +37,45 @@ const useStyles = makeStyles((theme) => ({ }, })); +function a11yProps(index: any) { + return { + id: `nav-tab-${index}`, + 'aria-controls': `nav-tabpanel-${index}`, + }; +} + +function NavTabs() { + const [value, setValue] = React.useState(0); + + //TODO page refresh resets state. Must parse url to determine which tab is + //highlighted + const handleChange = (event: React.ChangeEvent<{}>, newValue: number) => { + setValue(newValue); + }; + + + return ( + + + + + + + + + ); +} + function Header() { const classes = useStyles(); @@ -54,6 +95,7 @@ function Header() {
+ ); } -- cgit