From a49b999a385a591e9da96409653ed6c7c00de1c3 Mon Sep 17 00:00:00 2001 From: IlyaDoronin Date: Mon, 28 Aug 2023 12:31:34 +0300 Subject: [PATCH] feat: OptionsPicture store logic --- .../OptionsPicture/settingOpytionsPict.tsx | 137 ++++++++++++++---- .../OptionsPicture/switchOptionsPict.tsx | 4 +- src/stores/questions.ts | 4 + 3 files changed, 111 insertions(+), 34 deletions(-) diff --git a/src/pages/Questions/OptionsPicture/settingOpytionsPict.tsx b/src/pages/Questions/OptionsPicture/settingOpytionsPict.tsx index a82e49b0..a5fdd795 100644 --- a/src/pages/Questions/OptionsPicture/settingOpytionsPict.tsx +++ b/src/pages/Questions/OptionsPicture/settingOpytionsPict.tsx @@ -1,7 +1,10 @@ -import {Box, Button, Typography, useTheme} from "@mui/material"; +import { useEffect } from "react"; +import { Box, Button, Typography, useTheme } from "@mui/material"; import CustomCheckbox from "@ui_kit/CustomCheckbox"; + +import { questionStore, updateQuestionsList } from "@root/questions"; + import InfoIcon from "../../../assets/icons/InfoIcon"; -import { useState } from "react"; import FormatIcon2 from "../../../assets/icons/questionsPage/FormatIcon2"; import FormatIcon1 from "../../../assets/icons/questionsPage/FormatIcon1"; import ProportionsIcon11 from "../../../assets/icons/questionsPage/ProportionsIcon11"; @@ -14,18 +17,38 @@ interface Props { onClick: () => void; } +type SettingOpytionsPictProps = { + totalIndex: number; +}; + +const PROPORTIONS = [ + { value: "1:1", icon: ProportionsIcon11 }, + { value: "2:1", icon: ProportionsIcon21 }, + { value: "1:2", icon: ProportionsIcon12 }, +]; + export function SelectIconButton({ Icon, isActive = false, onClick }: Props) { const theme = useTheme(); return (