Setup frontend frame
This commit is contained in:
15
frontend/src/components/Book.tsx
Normal file
15
frontend/src/components/Book.tsx
Normal file
@@ -0,0 +1,15 @@
|
||||
import React from 'react';
|
||||
|
||||
interface BookProps {
|
||||
title: string;
|
||||
}
|
||||
function Book(props: BookProps) {
|
||||
return (
|
||||
<li>
|
||||
{props.title}
|
||||
</li>
|
||||
);
|
||||
}
|
||||
|
||||
export default Book;
|
||||
|
||||
33
frontend/src/components/NavBar.tsx
Normal file
33
frontend/src/components/NavBar.tsx
Normal file
@@ -0,0 +1,33 @@
|
||||
// Kopiert fra https://mui.com/material-ui/react-app-bar/
|
||||
import React from 'react';
|
||||
import AppBar from '@mui/material/AppBar';
|
||||
import Box from '@mui/material/Box';
|
||||
import Toolbar from '@mui/material/Toolbar';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import Button from '@mui/material/Button';
|
||||
import IconButton from '@mui/material/IconButton';
|
||||
import MenuIcon from '@mui/icons-material/Menu';
|
||||
|
||||
export default function NavBar() {
|
||||
return (
|
||||
<Box sx={{ flexGrow: 1 }}>
|
||||
<AppBar position="static">
|
||||
<Toolbar>
|
||||
<IconButton
|
||||
size="large"
|
||||
edge="start"
|
||||
color="inherit"
|
||||
aria-label="menu"
|
||||
sx={{ mr: 2 }}
|
||||
>
|
||||
<MenuIcon />
|
||||
</IconButton>
|
||||
<Typography variant="h6" component="div" sx={{ flexGrow: 1 }}>
|
||||
News
|
||||
</Typography>
|
||||
<Button color="inherit">Login</Button>
|
||||
</Toolbar>
|
||||
</AppBar>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user