Advertisement
Frumkin

Untitled

May 7th, 2025
390
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import {
  2.   Box,
  3.   CssBaseline,
  4.   List,
  5.   ListItem,
  6.   Stack,
  7.   Typography,
  8. } from "@mui/material";
  9.  
  10. export const Footer = () => {
  11.   return (
  12.     <Box component="footer" sx={{ height: "20rem", backgroundColor: "pink" }}>
  13.       <Box
  14.         sx={{
  15.           height: "100%",
  16.           paddingBlock: "5rem",
  17.           paddingRight: "12rem",
  18.           paddingLeft: "3rem",
  19.           display: "flex",
  20.           flexDirection: {
  21.             xs: "column",
  22.             md: "row",
  23.           },
  24.           gap: {
  25.             xs: "1rem", // smaller gap when stacked
  26.             md: "3rem", // larger gap when side-by-side
  27.           },
  28.         }}
  29.       >
  30.         <Box
  31.           sx={{
  32.             minWidth: "13rem",
  33.             width: "13rem",
  34.             minHeight: "4rem",
  35.             height: "4rem",
  36.             backgroundColor: "red",
  37.             display: "flex",
  38.             justifyContent: "center",
  39.             alignItems: "center",
  40.           }}
  41.         >
  42.           <Typography
  43.             sx={{ color: "white", fontWeight: "bold", fontSize: "1.5rem" }}
  44.           >
  45.             Logo
  46.           </Typography>
  47.         </Box>
  48.  
  49.         <Box
  50.           sx={{
  51.             height: "100%",
  52.             display: "flex",
  53.             flexWrap: "wrap",
  54.             gap: "1rem",
  55.             overflow: "auto",
  56.             backgroundColor: "yellow",
  57.           }}
  58.         >
  59.           {[1, 2, 3, 4, 5].map((value) => (
  60.             <Box
  61.               key={value}
  62.               sx={{
  63.                 width: "10rem",
  64.                 backgroundColor: "blue",
  65.                 display: "flex",
  66.                 justifyContent: "center",
  67.                 alignItems: "center",
  68.               }}
  69.             >
  70.               <List>
  71.                 {[69, 420, 666].map((x) => (
  72.                   <ListItem key={x}>
  73.                     <Typography
  74.                       sx={{
  75.                         color: "white",
  76.                         fontWeight: "bold",
  77.                         fontSize: "1.5rem",
  78.                       }}
  79.                     >
  80.                       link
  81.                     </Typography>
  82.                   </ListItem>
  83.                 ))}
  84.               </List>
  85.             </Box>
  86.           ))}
  87.         </Box>
  88.       </Box>
  89.     </Box>
  90.   );
  91. };
  92.  
  93. export const App = () => {
  94.   return (
  95.     <>
  96.       <CssBaseline />
  97.       <Stack dir="rtl">
  98.         <Box
  99.           component="nav"
  100.           sx={{ minHeight: "7.5em", backgroundColor: "olivedrab" }}
  101.         >
  102.           <Typography>Navbar</Typography>
  103.         </Box>
  104.         <Box component="main" sx={{ height: "65rem" }}>
  105.           <Typography>Main</Typography>
  106.         </Box>
  107.         <Footer />
  108.       </Stack>
  109.     </>
  110.   );
  111. };
  112.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement