diff --git a/src/create/createQuestion.tsx b/src/create/createQuestion.tsx index b93c5f4a..98355571 100644 --- a/src/create/createQuestion.tsx +++ b/src/create/createQuestion.tsx @@ -6,6 +6,7 @@ import { 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 { @@ -30,8 +31,7 @@ const types = [ {desc:"кнопка", value:"button"}, {desc:"ничего", value:"none"} ] - -const TextField = (props: any) => { +export const TextField = (props: any) => { const [field, meta, helpers] = useField(props); @@ -217,45 +217,11 @@ export default () => { - { - type === 0 ? //Тип вопроса - текст? - - : - type === 3 ? //Тип вопроса - файл? - - : - stockroom.length === 0 ? //В поле для юзерских данных есть что-то? - null //Ничего не внесено - : - type === 1 ? //Тип вопроса - селект? - - : - type === 2 ? //Тип вопроса - чекбокс? - stockroom.map((e:any, i:number) => { - return {e.text} - }) - : - type === 4 ? //Тип вопроса - кнопка? - stockroom.map((e:any, i:number) => { - return - }) - : - null //Тип вопроса - ничего - } + { diff --git a/src/create/tools/list.tsx b/src/create/tools/list.tsx deleted file mode 100644 index 6965db45..00000000 --- a/src/create/tools/list.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import React from 'react'; -import {Button, VStack, HStack, Textarea, Container, Text, CloseButton} from "@chakra-ui/react"; - - - -export default ({stockroom}: {stockroom: any,}) => { - const [color, setColor] = React.useState("#fff") - - return( - - - -