import { useParams } from "react-router-dom"; import { Box, Link, Typography, useMediaQuery, useTheme, IconButton, InputAdornment, Popover, TextField, TextareaAutosize} from "@mui/material"; import EnterIcon from "../../../assets/icons/questionsPage/enterIcon"; import ButtonsOptions from "../ButtonsOptions"; import SwitchEmoji from "./switchEmoji"; import React from "react"; import AddEmoji from "../../../assets/icons/questionsPage/addEmoji"; import { AnswerDraggableList } from "../AnswerDraggableList"; import { questionStore, updateQuestionsList } from "@root/questions"; import PointsIcon from "@icons/questionsPage/PointsIcon"; import MessageIcon from "@icons/messagIcon"; import DeleteIcon from "@icons/questionsPage/deleteIcon"; import { ImageAddIcons } from "@icons/ImageAddIcons"; import { EmojiIcons } from "@icons/EmojiIocns"; interface Props { totalIndex: number; } export default function Emoji({ totalIndex }: Props) { const [switchState, setSwitchState] = React.useState("setting"); const { listQuestions } = questionStore(); const quizId = Number(useParams().quizId); const theme = useTheme(); const isMobile = useMediaQuery(theme.breakpoints.down(790)); const SSHC = (data: string) => { setSwitchState(data); }; return ( <> {!isMobile && } ), endAdornment: ( ), }} sx={{ "& .MuiInputBase-root": { padding: "13.5px", borderRadius: "10px", background: "#ffffff", }, "& .MuiOutlinedInput-notchedOutline": { border: "none", }, }} inputProps={{ sx: { fontSize: "18px", lineHeight: "21px", py: 0 }, }} /> {isMobile && ( + )} { const answerNew = listQuestions[quizId][totalIndex].content.variants.slice(); answerNew.push({ answer: "", hints: "" }); updateQuestionsList(quizId, totalIndex, { content: { ...listQuestions[quizId][totalIndex].content, variants: answerNew, }, }); }} > Добавьте ответ {isMobile ? null : ( <> или нажмите Enter )} ); }