|
@@ -1,13 +1,13 @@
|
1
|
1
|
import * as React from 'react';
|
2
|
|
-// import Box from '@mui/material/Box';
|
|
2
|
+
|
3
|
3
|
import Card from '@mui/material/Card';
|
4
|
|
-import CardActions from '@mui/material/CardActions';
|
|
4
|
+// import CardActions from '@mui/material/CardActions';
|
5
|
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';
|
|
6
|
+// import Button from '@mui/material/Button';
|
|
7
|
+// import Typography from '@mui/material/Typography';
|
|
8
|
+// import Avatar from '@mui/material/Avatar';
|
9
|
9
|
import Checkbox from '@mui/material/Checkbox';
|
10
|
|
-import { deepPurple } from '@mui/material/colors';
|
|
10
|
+// import { deepPurple } from '@mui/material/colors';
|
11
|
11
|
|
12
|
12
|
import List from '@mui/material/List';
|
13
|
13
|
import ListItem from '@mui/material/ListItem';
|
|
@@ -15,6 +15,28 @@ import ListItemButton from '@mui/material/ListItemButton';
|
15
|
15
|
import ListItemIcon from '@mui/material/ListItemIcon';
|
16
|
16
|
import ListItemText from '@mui/material/ListItemText';
|
17
|
17
|
|
|
18
|
+import AddIcon from '@mui/icons-material/Add';
|
|
19
|
+import RemoveIcon from '@mui/icons-material/Remove';
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+function CheckboxexHeader(prop) {
|
|
23
|
+ return (
|
|
24
|
+ <List sx={{ width: '100%', bgcolor: 'background.paper' }}>
|
|
25
|
+ <ListItem>
|
|
26
|
+ <ListItemButton role={undefined} dense>
|
|
27
|
+ <ListItemText style={{marginRight :25, color:'silver'}} primary={prop.title} />
|
|
28
|
+ <ListItemIcon>
|
|
29
|
+ <AddIcon />
|
|
30
|
+ </ListItemIcon>
|
|
31
|
+ <ListItemIcon>
|
|
32
|
+ <RemoveIcon />
|
|
33
|
+ </ListItemIcon>
|
|
34
|
+ </ListItemButton>
|
|
35
|
+ </ListItem>
|
|
36
|
+ </List>
|
|
37
|
+ );
|
|
38
|
+}
|
|
39
|
+
|
18
|
40
|
function CheckboxesGroup(props) {
|
19
|
41
|
|
20
|
42
|
const [checked, setChecked] = React.useState([0]);
|
|
@@ -39,7 +61,7 @@ function CheckboxesGroup(props) {
|
39
|
61
|
return (
|
40
|
62
|
<ListItem key={value.id}>
|
41
|
63
|
<ListItemButton role={undefined} onClick={handleToggle(value)} dense>
|
42
|
|
- <ListItemText id={labelId} primary={value.nombre} />
|
|
64
|
+ <ListItemText className="checkbox_label_question" id={labelId} primary={value.nombre} />
|
43
|
65
|
<ListItemIcon>
|
44
|
66
|
<Checkbox
|
45
|
67
|
edge="start"
|
|
@@ -47,7 +69,7 @@ function CheckboxesGroup(props) {
|
47
|
69
|
tabIndex={-1}
|
48
|
70
|
disableRipple
|
49
|
71
|
inputProps={{ 'aria-labelledby': labelId }}
|
50
|
|
- />
|
|
72
|
+ />
|
51
|
73
|
</ListItemIcon>
|
52
|
74
|
<ListItemIcon>
|
53
|
75
|
<Checkbox
|
|
@@ -56,7 +78,7 @@ function CheckboxesGroup(props) {
|
56
|
78
|
tabIndex={-1}
|
57
|
79
|
disableRipple
|
58
|
80
|
inputProps={{ 'aria-labelledby': labelId }}
|
59
|
|
- />
|
|
81
|
+ />
|
60
|
82
|
</ListItemIcon>
|
61
|
83
|
</ListItemButton>
|
62
|
84
|
</ListItem>
|
|
@@ -67,11 +89,14 @@ function CheckboxesGroup(props) {
|
67
|
89
|
}
|
68
|
90
|
|
69
|
91
|
export function Question({ quiz }) {
|
70
|
|
- let { instrucciondepregunta, id, respuestas } = quiz
|
|
92
|
+ console.log('quiz: ', quiz)
|
|
93
|
+ let { instrucciondepregunta,respuestas } = quiz
|
71
|
94
|
return (
|
72
|
|
- <Card sx={{ minWidth: 275, margin: 5 }}>
|
|
95
|
+
|
|
96
|
+ <Card sx={{ minWidth: 275, margin: 5 , borderLeft: '5px solid var(--main)'}}>
|
73
|
97
|
<CardContent>
|
74
|
98
|
|
|
99
|
+ {/*
|
75
|
100
|
<div sx={{ fontSize: 17 }}>
|
76
|
101
|
<div className="quiz_title_text">
|
77
|
102
|
<Avatar sx={{ bgcolor: deepPurple[500] }}>{id}</Avatar>
|
|
@@ -80,15 +105,22 @@ export function Question({ quiz }) {
|
80
|
105
|
</Typography>
|
81
|
106
|
</div>
|
82
|
107
|
</div>
|
|
108
|
+ */}
|
83
|
109
|
|
84
|
110
|
<div variant="body2">
|
85
|
|
- <CheckboxesGroup quiz={respuestas}/>
|
|
111
|
+ <List>
|
|
112
|
+ <CheckboxexHeader title={instrucciondepregunta}/>
|
|
113
|
+ </List>
|
|
114
|
+ <CheckboxesGroup quiz={respuestas} />
|
86
|
115
|
</div>
|
87
|
116
|
</CardContent>
|
88
|
117
|
|
|
118
|
+ {/*
|
89
|
119
|
<CardActions>
|
90
|
|
- <Button size="small">Siguiente Pregunta</Button>
|
|
120
|
+ <Button variant="contained" size="small">Anterior</Button>
|
|
121
|
+ <Button variant="contained" size="small">Siguiente</Button>
|
91
|
122
|
</CardActions>
|
|
123
|
+ */}
|
92
|
124
|
|
93
|
125
|
</Card>
|
94
|
126
|
);
|