|
|
@@ -1,29 +1,22 @@
|
|
|
import * as React from 'react';
|
|
|
|
|
|
-import Card from '@mui/material/Card';
|
|
|
-// import CardActions from '@mui/material/CardActions';
|
|
|
-import CardContent from '@mui/material/CardContent';
|
|
|
-// import Button from '@mui/material/Button';
|
|
|
-// import Typography from '@mui/material/Typography';
|
|
|
-// import Avatar from '@mui/material/Avatar';
|
|
|
-import Checkbox from '@mui/material/Checkbox';
|
|
|
-// import { deepPurple } from '@mui/material/colors';
|
|
|
+import {
|
|
|
+ Remove as RemoveIcon,
|
|
|
+ Add as AddIcon
|
|
|
+} from '@mui/icons-material';
|
|
|
|
|
|
-import List from '@mui/material/List';
|
|
|
-import Tooltip from '@mui/material/Tooltip';
|
|
|
-import ListItem from '@mui/material/ListItem';
|
|
|
-import ListItemButton from '@mui/material/ListItemButton';
|
|
|
-import ListItemIcon from '@mui/material/ListItemIcon';
|
|
|
-import ListItemText from '@mui/material/ListItemText';
|
|
|
-
|
|
|
-import AddIcon from '@mui/icons-material/Add';
|
|
|
-import RemoveIcon from '@mui/icons-material/Remove';
|
|
|
+import {
|
|
|
+ Card,CardContent,Avatar,Checkbox,List,Tooltip,
|
|
|
+ ListItem,ListItemButton,ListItemIcon,ListItemText
|
|
|
+} from '@mui/material'
|
|
|
|
|
|
+import { deepPurple } from '@mui/material/colors';
|
|
|
|
|
|
function CheckboxexHeader(prop) {
|
|
|
return (
|
|
|
<List sx={{ width: '100%', bgcolor: 'background.paper' }}>
|
|
|
<ListItem>
|
|
|
+ <Avatar sx={{ bgcolor: deepPurple[500] }}>{prop.group}</Avatar>
|
|
|
<ListItemButton role={undefined} dense>
|
|
|
<ListItemText style={{marginRight :25, color:'silver'}} primary={prop.title} />
|
|
|
<ListItemIcon>
|
|
|
@@ -62,9 +55,11 @@ function CheckboxesGroup(props) {
|
|
|
return (
|
|
|
<ListItem key={value.id}>
|
|
|
<ListItemButton role={undefined} onClick={handleToggle(value)} dense>
|
|
|
-
|
|
|
<Tooltip title={value.decription} placement="top-start" arrow>
|
|
|
- <ListItemText className="checkbox_label_question" id={labelId} primary={value.nombre} />
|
|
|
+ <ListItemText
|
|
|
+ sx={{ '& .MuiTypography-root' : {
|
|
|
+ fontWeight:'bold'
|
|
|
+ }}} className="checkbox_label_question" id={labelId} primary={value.nombre} />
|
|
|
</Tooltip>
|
|
|
|
|
|
<ListItemIcon>
|
|
|
@@ -93,40 +88,19 @@ function CheckboxesGroup(props) {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
-export function Question({ quiz, group }) {
|
|
|
- // console.log('quiz: ', quiz)
|
|
|
- let { instrucciondepregunta, respuestas } = quiz
|
|
|
+export function Question({ quiz}) {
|
|
|
+ let { instrucciondepregunta, respuestas,id } = quiz
|
|
|
return (
|
|
|
-
|
|
|
<Card sx={{ minWidth: 275, margin: '30px !important', borderLeft: '5px solid var(--main)'}}>
|
|
|
<CardContent>
|
|
|
|
|
|
- {/*
|
|
|
- <div sx={{ fontSize: 17 }}>
|
|
|
- <div className="quiz_title_text">
|
|
|
- <Avatar sx={{ bgcolor: deepPurple[500] }}>{id}</Avatar>
|
|
|
- <Typography style={{ paddingLeft: 15 }}>
|
|
|
- {instrucciondepregunta}
|
|
|
- </Typography>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- */}
|
|
|
-
|
|
|
<div variant="body2">
|
|
|
<List>
|
|
|
- <CheckboxexHeader title={group + " - " + instrucciondepregunta}/>
|
|
|
+ <CheckboxexHeader group={id} title={instrucciondepregunta}/>
|
|
|
</List>
|
|
|
<CheckboxesGroup quiz={respuestas} />
|
|
|
</div>
|
|
|
</CardContent>
|
|
|
-
|
|
|
- {/*
|
|
|
- <CardActions>
|
|
|
- <Button variant="contained" size="small">Anterior</Button>
|
|
|
- <Button variant="contained" size="small">Siguiente</Button>
|
|
|
- </CardActions>
|
|
|
- */}
|
|
|
-
|
|
|
</Card>
|
|
|
);
|
|
|
}
|