Untitled
unknown
typescript
4 years ago
5.0 kB
4
Indexable
import React from 'react'; import TopAppBar from '../topAppBar/topAppBar'; import Box from '@mui/material/Box'; import Grid from '@mui/material/Grid'; import AppBar from '@mui/material/AppBar'; import Button from '@mui/material/Button'; import CameraIcon from '@mui/icons-material/PhotoCamera'; import Card from '@mui/material/Card'; import CardActions from '@mui/material/CardActions'; import CardContent from '@mui/material/CardContent'; import CardMedia from '@mui/material/CardMedia'; import CssBaseline from '@mui/material/CssBaseline'; import Stack from '@mui/material/Stack'; import Toolbar from '@mui/material/Toolbar'; import Typography from '@mui/material/Typography'; import Container from '@mui/material/Container'; import Link from '@mui/material/Link'; import { createTheme, ThemeProvider } from '@mui/material/styles'; ///* class Restaurants extends React.Component{ render() { const cards = [1, 2, 3, 4, 5, 6, 7, 8, 9]; const theme = createTheme(); const debug = 1; //const debug = false; return ( <ThemeProvider theme={theme}> <CssBaseline /> {debug ? <AppBar position="relative"> <Toolbar> <CameraIcon sx={{ mr: 2 }} /> <Typography variant="h6" color="inherit" noWrap> Album layout </Typography> </Toolbar> </AppBar> : <TopAppBar page='restaurants' />} <main> <Box sx={{ bgcolor: 'background.paper', pt: 8, pb: 6, }} > <Container maxWidth="sm"> <Typography component="h1" variant="h2" align="center" color="text.primary" gutterBottom > Album Layout </Typography> <Typography variant="h5" align="center" color="text.secondary" paragraph> Something short and leading about the collection below—its contents, the creator, etc. Make it short and sweet, but not too short so folks don't simply skip over it entirely. </Typography> <Stack sx={{ pt:4 }} direction="row" spacing={2} justifyContent="center" > <Button variant="contained">Main call to action</Button> <Button variant="outlined">Secondary action</Button> </Stack> </Container> </Box> <Container sx={{ py: 8 }} maxWidth="md"> <Grid container spacing={4}> {cards.map((card) => ( <Grid item key={card} xs={12} sm={6} md={4}> <Card sx={{ height: '100%', display: 'flex', flexDirection: 'column' }} > <CardMedia component="img" sx={{ // 16:9 pt: '56.25%', }} image="https://source.unsplash.com/random" alt="random" /> <CardContent sx={{ flexGrow: 1 }}> <Typography gutterBottom variant="h5" component="h2"> Heading </Typography> <Typography> This is a media card. You can use this section to describe the content. </Typography> </CardContent> <CardActions> <Button size="small">View</Button> <Button size="small">Edit</Button> </CardActions> </Card> </Grid> ))} </Grid> </Container> </main> {/* Footer */} <Box sx={{ bgcolor: 'background.paper', p: 6 }} component="footer"> <Typography variant="h6" align="center" gutterBottom> Footer </Typography> <Typography variant="subtitle1" align="center" color="text.secondary" component="p" > Something here to give the footer a purpose! </Typography> </Box> {/* End footer */} </ThemeProvider> ); /* return ( <Box mx={2}> <> <TopAppBar page='restaurants'/> <Grid container mt={15}> <Grid item xs={6}> <div className='title'>Restaurants</div> </Grid> </Grid> </> </Box> ); //*/ } } export default Restaurants; //*/
Editor is loading...