import MiniButtonSetting from "@ui_kit/MiniButtonSetting"; import React from "react"; import SettingIcon from "../../assets/icons/questionsPage/settingIcon"; import Branching from "../../assets/icons/questionsPage/branching"; import { Box, useTheme } from "@mui/material"; import SupplementIcon from "../../assets/icons/ContactFormIcon/supplementIcon"; interface Props { switchState: string; SSHC: (data: string) => void; } export default function ButtonSettingForms({ SSHC, switchState }: Props) { const theme = useTheme(); const buttonSetting: { icon: JSX.Element; title: string; value: string }[] = [ { icon: , title: "Настройки", value: "setting", }, { icon: , title: "Ветвление", value: "branching", }, { icon: , title: "Добавить шаг формы", value: "supplement", }, ]; return ( {buttonSetting.map((e, i) => ( { SSHC(e.value); }} sx={{ backgroundColor: switchState === e.value ? theme.palette.brightPurple.main : "transparent", color: switchState === e.value ? "#ffffff" : theme.palette.grey3.main, }} > {e.icon} {e.title} ))} ); }