|
@@ -1,29 +1,22 @@
|
1
|
1
|
import * as React from 'react';
|
2
|
2
|
|
3
|
|
-import Card from '@mui/material/Card';
|
4
|
|
-// import CardActions from '@mui/material/CardActions';
|
5
|
|
-import CardContent from '@mui/material/CardContent';
|
6
|
|
-// import Button from '@mui/material/Button';
|
7
|
|
-// import Typography from '@mui/material/Typography';
|
8
|
|
-// import Avatar from '@mui/material/Avatar';
|
9
|
|
-import Checkbox from '@mui/material/Checkbox';
|
10
|
|
-// import { deepPurple } from '@mui/material/colors';
|
|
3
|
+import {
|
|
4
|
+ Remove as RemoveIcon,
|
|
5
|
+ Add as AddIcon
|
|
6
|
+} from '@mui/icons-material';
|
11
|
7
|
|
12
|
|
-import List from '@mui/material/List';
|
13
|
|
-import Tooltip from '@mui/material/Tooltip';
|
14
|
|
-import ListItem from '@mui/material/ListItem';
|
15
|
|
-import ListItemButton from '@mui/material/ListItemButton';
|
16
|
|
-import ListItemIcon from '@mui/material/ListItemIcon';
|
17
|
|
-import ListItemText from '@mui/material/ListItemText';
|
18
|
|
-
|
19
|
|
-import AddIcon from '@mui/icons-material/Add';
|
20
|
|
-import RemoveIcon from '@mui/icons-material/Remove';
|
|
8
|
+import {
|
|
9
|
+ Card,CardContent,Avatar,Checkbox,List,Tooltip,
|
|
10
|
+ ListItem,ListItemButton,ListItemIcon,ListItemText
|
|
11
|
+} from '@mui/material'
|
21
|
12
|
|
|
13
|
+import { deepPurple } from '@mui/material/colors';
|
22
|
14
|
|
23
|
15
|
function CheckboxexHeader(prop) {
|
24
|
16
|
return (
|
25
|
17
|
<List sx={{ width: '100%', bgcolor: 'background.paper' }}>
|
26
|
18
|
<ListItem>
|
|
19
|
+ <Avatar sx={{ bgcolor: deepPurple[500] }}>{prop.group}</Avatar>
|
27
|
20
|
<ListItemButton role={undefined} dense>
|
28
|
21
|
<ListItemText style={{marginRight :25, color:'silver'}} primary={prop.title} />
|
29
|
22
|
<ListItemIcon>
|
|
@@ -62,9 +55,11 @@ function CheckboxesGroup(props) {
|
62
|
55
|
return (
|
63
|
56
|
<ListItem key={value.id}>
|
64
|
57
|
<ListItemButton role={undefined} onClick={handleToggle(value)} dense>
|
65
|
|
-
|
66
|
58
|
<Tooltip title={value.decription} placement="top-start" arrow>
|
67
|
|
- <ListItemText className="checkbox_label_question" id={labelId} primary={value.nombre} />
|
|
59
|
+ <ListItemText
|
|
60
|
+ sx={{ '& .MuiTypography-root' : {
|
|
61
|
+ fontWeight:'bold'
|
|
62
|
+ }}} className="checkbox_label_question" id={labelId} primary={value.nombre} />
|
68
|
63
|
</Tooltip>
|
69
|
64
|
|
70
|
65
|
<ListItemIcon>
|
|
@@ -93,40 +88,19 @@ function CheckboxesGroup(props) {
|
93
|
88
|
);
|
94
|
89
|
}
|
95
|
90
|
|
96
|
|
-export function Question({ quiz, group }) {
|
97
|
|
- // console.log('quiz: ', quiz)
|
98
|
|
- let { instrucciondepregunta, respuestas } = quiz
|
|
91
|
+export function Question({ quiz}) {
|
|
92
|
+ let { instrucciondepregunta, respuestas,id } = quiz
|
99
|
93
|
return (
|
100
|
|
-
|
101
|
94
|
<Card sx={{ minWidth: 275, margin: '30px !important', borderLeft: '5px solid var(--main)'}}>
|
102
|
95
|
<CardContent>
|
103
|
96
|
|
104
|
|
- {/*
|
105
|
|
- <div sx={{ fontSize: 17 }}>
|
106
|
|
- <div className="quiz_title_text">
|
107
|
|
- <Avatar sx={{ bgcolor: deepPurple[500] }}>{id}</Avatar>
|
108
|
|
- <Typography style={{ paddingLeft: 15 }}>
|
109
|
|
- {instrucciondepregunta}
|
110
|
|
- </Typography>
|
111
|
|
- </div>
|
112
|
|
- </div>
|
113
|
|
- */}
|
114
|
|
-
|
115
|
97
|
<div variant="body2">
|
116
|
98
|
<List>
|
117
|
|
- <CheckboxexHeader title={group + " - " + instrucciondepregunta}/>
|
|
99
|
+ <CheckboxexHeader group={id} title={instrucciondepregunta}/>
|
118
|
100
|
</List>
|
119
|
101
|
<CheckboxesGroup quiz={respuestas} />
|
120
|
102
|
</div>
|
121
|
103
|
</CardContent>
|
122
|
|
-
|
123
|
|
- {/*
|
124
|
|
- <CardActions>
|
125
|
|
- <Button variant="contained" size="small">Anterior</Button>
|
126
|
|
- <Button variant="contained" size="small">Siguiente</Button>
|
127
|
|
- </CardActions>
|
128
|
|
- */}
|
129
|
|
-
|
130
|
104
|
</Card>
|
131
|
105
|
);
|
132
|
106
|
}
|