import { Box, Link, Typography, useTheme } from "@mui/material"; import { updateQuiz } from "@root/quizes/actions"; import { useCurrentQuiz } from "@root/quizes/hooks"; import CustomTextField from "@ui_kit/CustomTextField"; import { ChangeEvent, useState } from "react"; export default function Extra() { const theme = useTheme(); const [isExpanded, setIsExpanded] = useState(false); const quiz = useCurrentQuiz(); const expandedHC = (bool: boolean) => { setIsExpanded(bool); }; const mutationOrgMetaHC = (event: ChangeEvent) => { updateQuiz(quiz?.id, quiz => { quiz.config.meta = event.target.value; }); }; return ( expandedHC(!isExpanded)} sx={{ paddingTop: "15px", paddingRight: "20px", display: "flex", alignItems: "center", justifyContent: "space-between", cursor: "pointer", userSelect: "none", }} > Дополнительно {isExpanded && quiz && ( Mета заголовок Текст-заполнитель — это текст, который имеет Текст-заполнитель — это текст, который имеет Текст-заполнитель — это текст, который имеет Текст-заполнитель — это текст, который имеет Текст-заполнитель )} ); }