Skip to content

Commit

Permalink
Add app bar with title
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentbitter committed Dec 9, 2019
1 parent 5ca8126 commit 4ad0d69
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
3 changes: 0 additions & 3 deletions website/src/components/Devices.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ class Devices extends React.Component {
render() {
return (
<Grid container spacing={3} style={{ padding: '1rem' }}>
<Grid item xs={12} sm={6}>
<h1>Your Devices</h1>
</Grid>
<Grid item xs={12} sm={6}>
<AddDevice />
</Grid>
Expand Down
25 changes: 25 additions & 0 deletions website/src/components/Navigation.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import AppBar from '@material-ui/core/AppBar';
import Toolbar from '@material-ui/core/Toolbar';
import Typography from '@material-ui/core/Typography';

const useStyles = makeStyles(theme => ({
title: {
flexGrow: 1,
},
}));

export default function Navigation() {
const classes = useStyles();

return (
<AppBar position="static">
<Toolbar>
<Typography variant="h6" className={classes.title}>
Your Devices
</Typography>
</Toolbar>
</AppBar>
);
}
2 changes: 2 additions & 0 deletions website/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ import ReactDOM from 'react-dom';
import CssBaseline from '@material-ui/core/CssBaseline';
import Box from '@material-ui/core/Box';
import Devices from './components/Devices';
import Navigation from './components/Navigation';
import { view } from 'react-easy-state';
import 'typeface-roboto';

const App = view(() => {
return (
<React.Fragment>
<CssBaseline />
<Navigation />
<Box component="div" m={3}>
<Devices />
</Box>
Expand Down

0 comments on commit 4ad0d69

Please sign in to comment.