From f3e2f23a351e6abaac8abeb285cf08647ae9d99f Mon Sep 17 00:00:00 2001 From: IlyaDoronin Date: Tue, 15 Aug 2023 12:51:18 +0300 Subject: [PATCH] fix: buttons and other styles --- src/pages/Questions/helpQuestions.tsx | 91 +++++++++++++++++++++------ 1 file changed, 71 insertions(+), 20 deletions(-) diff --git a/src/pages/Questions/helpQuestions.tsx b/src/pages/Questions/helpQuestions.tsx index ae0ebd89..2ea766fa 100644 --- a/src/pages/Questions/helpQuestions.tsx +++ b/src/pages/Questions/helpQuestions.tsx @@ -1,4 +1,11 @@ -import { Box, Button, ButtonBase, Modal, Typography, useTheme } from "@mui/material"; +import { + Box, + Button, + ButtonBase, + Modal, + Typography, + useTheme, +} from "@mui/material"; import * as React from "react"; import SelectableButton from "@ui_kit/SelectableButton"; import CustomTextField from "@ui_kit/CustomTextField"; @@ -14,7 +21,8 @@ export default function HelpQuestions() { const handleOpen = () => setOpen(true); const handleClose = () => setOpen(false); const [backgroundType, setBackgroundType] = useState("text"); - const [backgroundTypeModal, setBackgroundTypeModal] = useState("linkVideo"); + const [backgroundTypeModal, setBackgroundTypeModal] = + useState("linkVideo"); const theme = useTheme(); const videoHC = (videoInp: HTMLInputElement) => { @@ -28,18 +36,33 @@ export default function HelpQuestions() { const [video, setVideo] = React.useState(""); return ( - - Подсказка консультанта + + Подсказка консультанта - setBackgroundType("text")}> + setBackgroundType("text")} + sx={{ maxWidth: "130px" }} + > Текст - setBackgroundType("video")}> + setBackgroundType("video")} + sx={{ maxWidth: "130px" }} + > Видео @@ -49,8 +72,13 @@ export default function HelpQuestions() { ) : ( - Загрузите видео - + + Загрузите видео + + {video ? ( @@ -100,42 +129,64 @@ export default function HelpQuestions() { setBackgroundTypeModal("linkVideo")} + sx={{ maxWidth: "170px", padding: "10px" }} > Ссылка на видео setBackgroundTypeModal("ownVideo")} + sx={{ maxWidth: "170px", padding: "10px" }} > Загрузить свое {backgroundTypeModal === "linkVideo" ? ( - Ссылка на видео - + + Ссылка на видео + + ) : ( - Загрузите видео - - videoHC(event.target)} hidden accept="video/*" multiple type="file" /> + + Загрузите видео + + + videoHC(event.target)} + hidden + accept="video/*" + multiple + type="file" + /> - - Добавить видео - Принимает .mp4 и .mov формат — максимум 100мб + + + Добавить видео + + + Принимает .mp4 и .mov формат — максимум 100мб +