浏览代码

responsive puestos style

amenpunk 2 年之前
父节点
当前提交
9c251c88c9
共有 4 个文件被更改,包括 28 次插入14 次删除
  1. 0 1
      src/App.css
  2. 0 2
      src/Components/Dashboard.js
  3. 24 8
      src/Components/Puestos/ListMode.jsx
  4. 4 3
      src/Css/all.css

+ 0 - 1
src/App.css

@@ -90,7 +90,6 @@
90 90
 .actions_butons_plaza{
91 91
     display: flex;
92 92
     flex-direction: row;
93
-    flex-wrap: nowrap;
94 93
     align-content: center;
95 94
     justify-content: space-around;
96 95
     align-items: flex-start;

+ 0 - 2
src/Components/Dashboard.js

@@ -248,12 +248,10 @@ function DashboardContent() {
248 248
                         {secondaryListItems}
249 249
                     </List>
250 250
                 </Drawer>
251
-                {/* <Box component="main" sx={{ backgroundColor: (theme) => theme.palette.mode === 'light' ? theme.palette.grey[100] : theme.palette.grey[900], flexGrow: 1, height: '100vh', overflow: 'auto', }} > */}
252 251
                     <Container maxWidth="lg" sx={{ mt: 2 , mb: 2 }}>
253 252
                         <Outlet/>
254 253
                         <Footer/>
255 254
                     </Container>
256
-                {/* </Box> */}
257 255
             </Box>
258 256
         </ThemeProvider>
259 257
     );

+ 24 - 8
src/Components/Puestos/ListMode.jsx

@@ -1,11 +1,18 @@
1 1
 import {  Col, Button, Table } from 'react-bootstrap'
2
-import Zoom from '@mui/material/Zoom';
2
+import { Zoom, useMediaQuery as Size, TableCell  } from '@mui/material'
3
+
4
+import ShowI from '@mui/icons-material/Grading';
5
+import EditI from '@mui/icons-material/Edit';
6
+import Deletei from '@mui/icons-material/Delete';
3 7
 
4 8
 export function ListMode(props) {
5 9
     
6 10
     const opciones = { weekday: 'long', year: 'numeric', month: 'short', day: 'numeric' };
7 11
     let { setEdit, setDelete, setShow, setPuesto, data, index, showing } = props;
8 12
 
13
+    const isMovil = Size('(min-width:770px)');
14
+    console.log("IS MOV:: ", isMovil)
15
+
9 16
     return(
10 17
         <Col md="12">
11 18
             <div className="body-table">
@@ -28,34 +35,43 @@ export function ListMode(props) {
28 35
                                             <td className="text-center">{ plaza.nombre }</td>
29 36
                                             <td className="text-center">{ plaza.description }</td>
30 37
                                             <td className="text-center">{ new Date( plaza.created ).toLocaleDateString('es-GT',opciones) }</td>
31
-                                            <td className="actions_butons_plaza"> 
38
+                                            <TableCell
39
+                                                sx={{
40
+                                                    "display":'flex',
41
+                                                    "flex-direction":'row',
42
+                                                    "justify-content": "space-between",
43
+                                                    "flex-wrap": !isMovil ? "wrap": "nowrap",
44
+                                                }} 
45
+                                                className="actions_butons_plaza"> 
32 46
                                                 <Button 
33 47
                                                     onClick={() => {
34 48
                                                         setPuesto(plaza) 
35 49
                                                         setShow(true)
36 50
                                                     }} 
37
-                                                    className="ver_producto">Ver
51
+                                                    className="ver_producto">
52
+                                                    {!isMovil ? <ShowI/> : "Ver"}
38 53
                                                 </Button>
39
-
40 54
                                                 <Button 
41 55
                                                     onClick={() => {
42 56
                                                         setPuesto(plaza) 
43 57
                                                         setEdit(true)
44 58
                                                     }} 
45
-                                                    className="editar_producto">Editar
59
+                                                    className="editar_producto">
60
+                                                    {!isMovil ? <EditI/> : "Editar"}
46 61
                                                 </Button>
47 62
                                                 <Button 
48 63
                                                     onClick={() => {
49 64
                                                         setPuesto(plaza) 
50 65
                                                         setDelete(true) 
51 66
                                                     }} 
52
-                                                    className="eliminar_producto">Eliminar
67
+                                                    className="eliminar_producto">
68
+                                                    {!isMovil ? <Deletei/> : "Eliminar"}
53 69
                                                 </Button>
54
-                                            </td>
70
+                                            </TableCell>
55 71
                                         </tr>
56 72
                                     </Zoom>
57 73
                                     )
58
-                            }) : <h1>no data bro</h1>
74
+                            }) : <span></span>
59 75
                         }
60 76
                     </tbody>
61 77
                     <tfoot>

+ 4 - 3
src/Css/all.css

@@ -852,8 +852,9 @@ table.dataTable tbody th, table.dataTable tbody td {
852 852
     background-color: #fff;
853 853
     background-clip: padding-box;
854 854
     border: 1px solid rgba(0,0,0,.2);
855
-    border-radius: 2px;
855
+    border-radius: 5px;
856 856
     outline: 0;
857
+    margin-top:12%;
857 858
 }
858 859
 .custom-file-upload-hidden {
859 860
   display: none;
@@ -3520,7 +3521,7 @@ All this is done for any sub-level being entered.
3520 3521
     width: 100%;
3521 3522
 }
3522 3523
 .content-section {
3523
-    padding: 40px 0px;
3524
+    padding: 10px 0px;
3524 3525
 }
3525 3526
 .cabeceras {
3526 3527
     background: #f1f1f1;
@@ -3633,7 +3634,7 @@ All this is done for any sub-level being entered.
3633 3634
     width: 100%;
3634 3635
 }
3635 3636
 .content-section {
3636
-    padding: 40px 0px;
3637
+    padding: 10px 0px;
3637 3638
 }
3638 3639
 .cabeceras {
3639 3640
     background: #f1f1f1;