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