diff --git a/src/assets/icons/CrossedEyeIcon.tsx b/src/assets/icons/CrossedEyeIcon.tsx index f2db60c7..c9021ca9 100644 --- a/src/assets/icons/CrossedEyeIcon.tsx +++ b/src/assets/icons/CrossedEyeIcon.tsx @@ -1,7 +1,16 @@ -export default function CrossedEyeIcon() { +import { FC, SVGProps } from "react"; + +export const CrossedEyeIcon: FC> = (props) => { return ( - - + + ); -} +}; diff --git a/src/assets/icons/questionsPage/OneIcon.tsx b/src/assets/icons/questionsPage/OneIcon.tsx index e7763088..64853a84 100755 --- a/src/assets/icons/questionsPage/OneIcon.tsx +++ b/src/assets/icons/questionsPage/OneIcon.tsx @@ -2,11 +2,17 @@ import { Box } from "@mui/material"; import { FC, SVGProps } from "react"; export const OneIcon: FC> = (props) => ( - - + + ); diff --git a/src/pages/Questions/ButtonsOptions.tsx b/src/pages/Questions/ButtonsOptions.tsx index 2a785131..ad5505de 100644 --- a/src/pages/Questions/ButtonsOptions.tsx +++ b/src/pages/Questions/ButtonsOptions.tsx @@ -174,10 +174,13 @@ export default function ButtonsOptions({ : theme.palette.grey3.main, minWidth: isWrappMiniButtonSetting ? "30px" : "64px", height: "30px", + "&:hover": { + color: theme.palette.grey3.main, + "& path": { stroke: theme.palette.grey3.main }, + }, }} > {icon} - {isWrappMiniButtonSetting ? null : title} @@ -199,6 +202,10 @@ export default function ButtonsOptions({ : theme.palette.grey3.main, minWidth: isWrappMiniButtonSetting ? "30px" : "64px", height: "30px", + "&:hover": { + color: theme.palette.grey3.main, + "& path": { stroke: theme.palette.grey3.main }, + }, }} > {icon} diff --git a/src/pages/Questions/DraggableList/ChooseAnswerModal.tsx b/src/pages/Questions/DraggableList/ChooseAnswerModal.tsx index 1c4493ac..44150618 100644 --- a/src/pages/Questions/DraggableList/ChooseAnswerModal.tsx +++ b/src/pages/Questions/DraggableList/ChooseAnswerModal.tsx @@ -129,9 +129,9 @@ export const ChooseAnswerModal = ({ onClick={() => { setOpenModal(false); - const question = listQuestions[quizId][totalIndex]; + const question = { ...listQuestions[quizId][totalIndex] }; - removeQuestionForce(quizId, totalIndex); + removeQuestionForce(quizId, question.id); createQuestion(quizId, selectedValue, totalIndex); updateQuestionsList(quizId, totalIndex, { expanded: question.expanded, diff --git a/src/pages/Questions/DraggableList/QuestionPageCard.tsx b/src/pages/Questions/DraggableList/QuestionPageCard.tsx index 01b8d026..68b63065 100644 --- a/src/pages/Questions/DraggableList/QuestionPageCard.tsx +++ b/src/pages/Questions/DraggableList/QuestionPageCard.tsx @@ -32,7 +32,7 @@ import { DeleteIcon } from "@icons/questionsPage/deleteIcon"; import { OneIcon } from "@icons/questionsPage/OneIcon"; import { PointsIcon } from "@icons/questionsPage/PointsIcon"; import { CopyIcon } from "@icons/questionsPage/CopyIcon"; -import CrossedEyeIcon from "@icons/CrossedEyeIcon"; +import { CrossedEyeIcon } from "@icons/CrossedEyeIcon"; import { HideIcon } from "@icons/questionsPage/hideIcon"; import Answer from "@icons/questionsPage/answer"; import OptionsPict from "@icons/questionsPage/options_pict"; @@ -62,77 +62,77 @@ const IconAndrom = (isExpanded: boolean, switchState: string) => { case "variant": return ( ); case "images": return ( ); case "varimg": return ( ); case "emoji": return ( ); case "text": return ( ); case "select": return ( ); case "date": return ( ); case "number": return ( ); case "file": return ( ); case "page": return ( ); case "rating": return ( ); @@ -171,21 +171,18 @@ export default function QuestionsPageCard({ sx={{ maxWidth: "796px", width: "100%", - borderRadius: "8px", - backgroundColor: question.expanded ? "white" : "#333647", + borderRadius: "12px", + boxShadow: "none", + backgroundColor: question.expanded ? "white" : "#EEE4FC", + border: question.expanded ? "none" : "1px solid #9A9AAF", }} > - + updateQuestionsList(quizId, totalIndex, { + expanded: !question.expanded, + }) + } > - - updateQuestionsList(quizId, totalIndex, { - expanded: !question.expanded, - }) - } - > - {question.expanded ? ( - - ) : ( - - )} - {question.expanded ? ( - <> + ) : ( - - } - checkedIcon={} - /> - } - label={""} - sx={{ - color: theme.palette.grey2.main, - ml: "-9px", - mr: 0, - userSelect: "none", - }} - /> - copyQuestion(quizId, totalIndex)}> - - - { - const removedId = question.id; - if (question.deleteTimeoutId) { - clearTimeout(question.deleteTimeoutId); - } - - removeQuestion(quizId, totalIndex); - - const newTimeoutId = window.setTimeout(() => { - removeQuestionForce(quizId, removedId); - }, 5000); - - updateQuestionsList( - quizId, - totalIndex, - { - ...question, - deleteTimeoutId: newTimeoutId, - } - ); - }} - > - - - + )} + + {question.expanded ? ( + <> + ) : ( + + + } + checkedIcon={} + /> + } + label={""} + sx={{ + color: theme.palette.grey2.main, + ml: "-9px", + mr: 0, + userSelect: "none", + }} + /> + copyQuestion(quizId, totalIndex)} + > + + + { + const removedId = question.id; + if (question.deleteTimeoutId) { + clearTimeout(question.deleteTimeoutId); + } - - + removeQuestion(quizId, totalIndex); + + const newTimeoutId = window.setTimeout(() => { + removeQuestionForce(quizId, removedId); + }, 5000); + + updateQuestionsList(quizId, totalIndex, { + ...question, + deleteTimeoutId: newTimeoutId, + }); + }} + > + + + + )} + + { - const question = listQuestions[quizId][totalIndex]; + const question = { ...listQuestions[quizId][totalIndex] }; - removeQuestion(quizId, totalIndex); + removeQuestionForce(quizId, question.id); createQuestion(quizId, value, totalIndex); updateQuestionsList(quizId, totalIndex, { expanded: question.expanded, + type: value, }); }} icon={icon} diff --git a/src/ui_kit/CustomWrapper.tsx b/src/ui_kit/CustomWrapper.tsx index f99ced30..0efbbe66 100644 --- a/src/ui_kit/CustomWrapper.tsx +++ b/src/ui_kit/CustomWrapper.tsx @@ -1,7 +1,7 @@ import { useState } from "react"; import { Box, IconButton, SxProps, Theme, Typography, useMediaQuery, useTheme } from "@mui/material"; -import CrossedEyeIcon from "@icons/CrossedEyeIcon"; +import { CrossedEyeIcon } from "@icons/CrossedEyeIcon"; import CopyIcon from "@icons/CopyIcon"; import TrashIcon from "@icons/TrashIcon"; import CountIcon from "@icons/CountIcon";