浏览代码

question fix style

amenpunk 2 年之前
父节点
当前提交
ba906ff7c7
共有 3 个文件被更改,包括 56 次插入34 次删除
  1. 3 2
      src/App.css
  2. 1 1
      src/Components/Test/Cleaver/Question.jsx
  3. 52 31
      src/Pages/Pruebas/Cleaver.jsx

+ 3 - 2
src/App.css

@@ -320,7 +320,8 @@
320 320
   flex-direction: column;
321 321
   flex-wrap: wrap;
322 322
   justify-content: center;
323
-  align-items: center;
323
+  align-items: stretch;
324
+  padding : 100px;
324 325
 }
325 326
 
326 327
 .question_btn{
@@ -348,6 +349,6 @@
348 349
   grid-column: 1;
349 350
   grid-row: 1;
350 351
   min-width: 275;
351
-  margin: 10px !important; 
352
+  /* margin: 10px !important;  */
352 353
   /* border-left: 5px solid var(--main); */
353 354
 }

+ 1 - 1
src/Components/Test/Cleaver/Question.jsx

@@ -1,7 +1,7 @@
1 1
 import * as React from 'react';
2 2
 import { Remove as RemoveIcon, Add as AddIcon } from '@mui/icons-material';
3 3
 import {
4
-  Card,CardContent,Avatar,Checkbox,List,Tooltip,Fade,
4
+  Card,CardContent,Avatar,Checkbox,List,Tooltip,Fade,Slide,
5 5
   ListItem,ListItemButton,ListItemIcon,ListItemText,
6 6
 } from '@mui/material'
7 7
 

+ 52 - 31
src/Pages/Pruebas/Cleaver.jsx

@@ -5,18 +5,39 @@ import { Box,Button, LinearProgress, Backdrop, CircularProgress, } from '@mui/ma
5 5
 import { useSelector } from 'react-redux';
6 6
 import { useParams, useNavigate } from 'react-router-dom'
7 7
 import toast, { Toaster } from 'react-hot-toast';
8
+import { createTheme, ThemeProvider } from '@mui/material/styles';
8 9
 
9 10
 
10 11
 function LinearProgressWithLabel(props) {
11 12
   return (
12 13
     <Box sx={{ display: 'flex', alignItems: 'center' }}>
13 14
       <Box sx={{ width: '100%', mr: 0 }}>
14
-        <LinearProgress variant="determinate" {...props} />
15
+        <LinearProgress color="primary" variant="determinate" {...props} />
15 16
       </Box>
16 17
     </Box>
17 18
   );
18 19
 }
19 20
 
21
+const theme = createTheme({
22
+  status: {
23
+    danger: '#e53e3e',
24
+  },
25
+  palette: {
26
+    primary: {
27
+      main: '#fd4b4b',
28
+      darker: '#053e85',
29
+    },
30
+    secondary : {
31
+      main: '#2ec5d3',
32
+      darker: '#053e85',
33
+    },
34
+    neutral: {
35
+      main: '#64748B',
36
+      contrastText: '#fff',
37
+    },
38
+  },
39
+});
40
+
20 41
 export function Cleaver() {
21 42
 
22 43
   let { id } = useParams();
@@ -122,25 +143,25 @@ export function Cleaver() {
122 143
 
123 144
 
124 145
   return (
125
-    <div>
126
-    <div className="content-section question">
127
-      <div style={{width:'60%', marginBottom : 35}}>
128
-        <LinearProgressWithLabel value={progress ? parseInt(progress) : 0 } />
129
-      </div>
130
-      <Box className="question_body">
131
-        {totalRespondidas.map((item,i) => (
132
-          <Question 
133
-            key={item.id} 
134
-            id={item.id} 
135
-            quiz={item} 
136
-            index={i} 
137
-            current={current} 
138
-            />)
139
-        )}
140
-      </Box>
141
-
142
-      {
143
-      totalPreguntas.length > 0 ?
146
+    <ThemeProvider theme={theme}>
147
+      <div className="content-section question">
148
+        <div style={{marginTop : 35}}>
149
+          <LinearProgressWithLabel value={progress ? parseInt(progress) : 0 } />
150
+        </div>
151
+        <Box className="question_body">
152
+          {totalRespondidas.map((item,i) => (
153
+            <Question 
154
+              key={item.id} 
155
+              id={item.id} 
156
+              quiz={item} 
157
+              index={i} 
158
+              current={current} 
159
+              />)
160
+          )}
161
+        </Box>
162
+
163
+        {
164
+        totalPreguntas.length > 0 ?
144 165
           (
145 166
             <div className="question_btn">
146 167
               <Button
@@ -175,18 +196,18 @@ export function Cleaver() {
175 196
               </Button>
176 197
             </div>
177 198
           )
178
-      
199
+
179 200
       }
180
-      <Toaster position="bottom-right" />
181
-      <Backdrop
182
-        sx={{ color: '#fd4b4b', zIndex: (theme) => theme.zIndex.drawer + 1 }}
183
-        open={open}
184
-        // onClick={()}
185
-      >
186
-        <CircularProgress color="inherit" />
187
-      </Backdrop>
188
-    </div>
189
-    </div>
201
+        <Toaster position="bottom-right" />
202
+        <Backdrop
203
+          sx={{ color: '#fd4b4b', zIndex: (theme) => theme.zIndex.drawer + 1 }}
204
+          open={open}
205
+          // onClick={()}
206
+        >
207
+          <CircularProgress color="inherit" />
208
+        </Backdrop>
209
+      </div>
210
+    </ThemeProvider>
190 211
   )
191 212
 
192 213
 }