import React from 'react'; import { useField, Form, FormikProps, Formik } from 'formik'; import { Select, Textarea, VStack, Checkbox, Button, } from '@chakra-ui/react' import 'suneditor/dist/css/suneditor.min.css'; // Import Sun Editor's CSS File import Description from "./description"; import Settings from "./settings"; import Types from "./types"; //Значения, собираемые для отправки на бэк interface Values { title: string; type: string; children: string; description: string; } //Поля объектов, используемых для отображения созданных пользователем инструментов interface ElementsOfObject { text: string; id: number; isFocus: boolean; color?: string; } const types = [ {desc:"текст", value:"text"}, {desc:"селект", value:"select"}, {desc:"чекбокс", value:"checkbox"}, {desc:"файл", value:"file"}, {desc:"кнопка", value:"button"}, {desc:"ничего", value:"none"} ] export const TextField = (props: any) => { const [field, meta, helpers] = useField(props); return ( <>