import { Box, ButtonBase, IconButton, Paper, Typography, useMediaQuery, useTheme, } from "@mui/material"; import ColorRingIcon from "./ColorRingIcon"; import { updateQuiz } from "@root/quizes/actions"; import { useCurrentQuiz } from "@root/quizes/hooks"; import { toggleQuizPreview } from "@root/quizPreview"; import VisibilityIcon from "@mui/icons-material/Visibility"; const ButtonsThemeLight = [ ["Стандартный", "StandardTheme", "#7E2AEA", "#FFFFFF"], ["Черно-белый", "BlackWhiteTheme", "#4E4D51", "#FFFFFF"], ["Оливковый", "OliveTheme", "#758E4F", "#F9FBF1"], ["Фиолетовый", "PurpleTheme", "#7E2AEA", "#FBF8FF"], ["Желтый", "YellowTheme", "#F2B133", "#FFFCF6"], ["Голубой", "BlueTheme", "#4964ED", "#F5F7FF"], ["Розовый", "PinkTheme", "#D34085", "#FFF9FC"], ]; const ButtonsThemeDark = [ ["Стандартный", "StandardDarkTheme", "#7E2AEA", "#FFFFFF"], ["Золотой", "GoldDarkTheme", "#E6AA37", "#FFFFFF"], ["Розовый", "PinkDarkTheme", "#D34085", "#FFFFFF"], ["Бирюзовый", "BlueDarkTheme", "#07A0C3", "#FFFFFF"], ]; export const DesignFilling = () => { const quiz = useCurrentQuiz(); const theme = useTheme(); const isMobile = useMediaQuery(theme.breakpoints.down(830)); return ( Дизайн Выберите цветовую схему для вашего опроса Со светлым фоном {ButtonsThemeLight.map((e, i) => ( updateQuiz(quiz.id, (quiz) => { quiz.config.theme = e[1]; }) } > {e[0]} ))} С тёмным фоном {ButtonsThemeDark.map((e, i) => ( updateQuiz(quiz.id, (quiz) => { quiz.config.theme = e[1]; }) } > {e[0]} ))} ); };