Browse Source

question fix style

amenpunk 2 years ago
parent
commit
ba906ff7c7
3 changed files with 56 additions and 34 deletions
  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
   flex-direction: column;
320
   flex-direction: column;
321
   flex-wrap: wrap;
321
   flex-wrap: wrap;
322
   justify-content: center;
322
   justify-content: center;
323
-  align-items: center;
323
+  align-items: stretch;
324
+  padding : 100px;
324
 }
325
 }
325
 
326
 
326
 .question_btn{
327
 .question_btn{
348
   grid-column: 1;
349
   grid-column: 1;
349
   grid-row: 1;
350
   grid-row: 1;
350
   min-width: 275;
351
   min-width: 275;
351
-  margin: 10px !important; 
352
+  /* margin: 10px !important;  */
352
   /* border-left: 5px solid var(--main); */
353
   /* border-left: 5px solid var(--main); */
353
 }
354
 }

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

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

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

5
 import { useSelector } from 'react-redux';
5
 import { useSelector } from 'react-redux';
6
 import { useParams, useNavigate } from 'react-router-dom'
6
 import { useParams, useNavigate } from 'react-router-dom'
7
 import toast, { Toaster } from 'react-hot-toast';
7
 import toast, { Toaster } from 'react-hot-toast';
8
+import { createTheme, ThemeProvider } from '@mui/material/styles';
8
 
9
 
9
 
10
 
10
 function LinearProgressWithLabel(props) {
11
 function LinearProgressWithLabel(props) {
11
   return (
12
   return (
12
     <Box sx={{ display: 'flex', alignItems: 'center' }}>
13
     <Box sx={{ display: 'flex', alignItems: 'center' }}>
13
       <Box sx={{ width: '100%', mr: 0 }}>
14
       <Box sx={{ width: '100%', mr: 0 }}>
14
-        <LinearProgress variant="determinate" {...props} />
15
+        <LinearProgress color="primary" variant="determinate" {...props} />
15
       </Box>
16
       </Box>
16
     </Box>
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
 export function Cleaver() {
41
 export function Cleaver() {
21
 
42
 
22
   let { id } = useParams();
43
   let { id } = useParams();
122
 
143
 
123
 
144
 
124
   return (
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
             <div className="question_btn">
166
             <div className="question_btn">
146
               <Button
167
               <Button
175
               </Button>
196
               </Button>
176
             </div>
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
 }