поправила значения типов вопросов в свиче, добавилаисчезновение блока с иконками на плашках при свертывании их
This commit is contained in:
parent
b7efee31a5
commit
67c7fb8493
@ -50,6 +50,7 @@ export default function QuestionsPageCard({totalIndex, DeleteClick}: Props) {
|
|||||||
sx={{ width: "100%", maxWidth: "760px", display: "flex", alignItems: "center", gap: "10px", padding: "20px" }}
|
sx={{ width: "100%", maxWidth: "760px", display: "flex", alignItems: "center", gap: "10px", padding: "20px" }}
|
||||||
>
|
>
|
||||||
<CustomTextField placeholder="Заголовок вопроса" text={""}
|
<CustomTextField placeholder="Заголовок вопроса" text={""}
|
||||||
|
//sx={{"& .MuiInputBase-root": {backgroundColor: isExpanded ? theme.palette.background.default : "transparent"}}}
|
||||||
onChange={e => {updateQuestionsList(params, totalIndex, {title: e.target.value})
|
onChange={e => {updateQuestionsList(params, totalIndex, {title: e.target.value})
|
||||||
console.log(listQuestions[params][totalIndex].title)
|
console.log(listQuestions[params][totalIndex].title)
|
||||||
}
|
}
|
||||||
@ -61,27 +62,33 @@ export default function QuestionsPageCard({totalIndex, DeleteClick}: Props) {
|
|||||||
:<ExpandLessIcon fill="#7E2AEA"/>
|
:<ExpandLessIcon fill="#7E2AEA"/>
|
||||||
}
|
}
|
||||||
</IconButton>
|
</IconButton>
|
||||||
<Box sx={{display: "flex"}}>
|
{isExpanded ?
|
||||||
<FormControlLabel
|
<></>
|
||||||
control={
|
:
|
||||||
<Checkbox
|
<Box sx={{display: "flex", borderRight: "solid 1px white"}}>
|
||||||
icon={<HideIcon/>}
|
<FormControlLabel
|
||||||
checkedIcon={<CrossedEyeIcon />}
|
control={
|
||||||
/>}
|
<Checkbox
|
||||||
label={""}
|
icon={<HideIcon/>}
|
||||||
sx={{
|
checkedIcon={<CrossedEyeIcon />}
|
||||||
color: theme.palette.grey2.main,
|
/>}
|
||||||
ml: "-9px",
|
label={""}
|
||||||
mr: 0,
|
sx={{
|
||||||
userSelect: "none",
|
color: theme.palette.grey2.main,
|
||||||
}}
|
ml: "-9px",
|
||||||
|
mr: 0,
|
||||||
|
userSelect: "none",
|
||||||
|
}}
|
||||||
|
|
||||||
|
/>
|
||||||
|
<IconButton><CopyIcon/></IconButton>
|
||||||
|
<IconButton sx={{ borderRadius: "6px", padding: "2px" }} onClick={DeleteClick}>
|
||||||
|
<DeleteIcon />
|
||||||
|
</IconButton>
|
||||||
|
</Box>
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/>
|
|
||||||
<IconButton><CopyIcon/></IconButton>
|
|
||||||
<IconButton sx={{ borderRadius: "6px", padding: "2px" }} onClick={DeleteClick}>
|
|
||||||
<DeleteIcon />
|
|
||||||
</IconButton>
|
|
||||||
</Box>
|
|
||||||
<OneIcon />
|
<OneIcon />
|
||||||
<PointsIcon />
|
<PointsIcon />
|
||||||
|
|
||||||
|
|||||||
@ -23,15 +23,15 @@ export default function SwitchQuestionsPage ({totalIndex }: Props) {
|
|||||||
const {listQuestions, updateQuestionsList, createQuestion, removeQuestion} = questionStore()
|
const {listQuestions, updateQuestionsList, createQuestion, removeQuestion} = questionStore()
|
||||||
const switchState = listQuestions[params][totalIndex].type
|
const switchState = listQuestions[params][totalIndex].type
|
||||||
switch (switchState) {
|
switch (switchState) {
|
||||||
case 'answer':
|
case 'variant':
|
||||||
return (<AnswerOptions totalIndex={totalIndex}/>);
|
return (<AnswerOptions totalIndex={totalIndex}/>);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'answerpict':
|
case 'images':
|
||||||
return (<OptionsPicture totalIndex={totalIndex}/>);
|
return (<OptionsPicture totalIndex={totalIndex}/>);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'answerandpict':
|
case 'varimg':
|
||||||
return (<OptionsAndPicture totalIndex={totalIndex}/>);
|
return (<OptionsAndPicture totalIndex={totalIndex}/>);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -39,11 +39,11 @@ export default function SwitchQuestionsPage ({totalIndex }: Props) {
|
|||||||
return (<Emoji totalIndex={totalIndex}/>);
|
return (<Emoji totalIndex={totalIndex}/>);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'textfield':
|
case 'text':
|
||||||
return (<OwnTextField totalIndex={totalIndex}/>);
|
return (<OwnTextField totalIndex={totalIndex}/>);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'dropdown':
|
case 'select':
|
||||||
return (<DropDown totalIndex={totalIndex}/>);
|
return (<DropDown totalIndex={totalIndex}/>);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -51,11 +51,11 @@ export default function SwitchQuestionsPage ({totalIndex }: Props) {
|
|||||||
return (<DataOptions totalIndex={totalIndex}/>);
|
return (<DataOptions totalIndex={totalIndex}/>);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'slider':
|
case 'number':
|
||||||
return (<SliderOptions totalIndex={totalIndex}/>);
|
return (<SliderOptions totalIndex={totalIndex}/>);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'uploader':
|
case 'file':
|
||||||
return (<UploadFile totalIndex={totalIndex}/>);
|
return (<UploadFile totalIndex={totalIndex}/>);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user