2023-04-26 17:24:19 +00:00
|
|
|
|
import {Box, Button, Link, Typography, useTheme} from "@mui/material";
|
2023-05-07 14:01:03 +00:00
|
|
|
|
import React, {useState} from "react";
|
2023-04-26 17:24:19 +00:00
|
|
|
|
import CustomCheckbox from "@ui_kit/CustomCheckbox";
|
|
|
|
|
import CustomTextField from "@ui_kit/CustomTextField";
|
|
|
|
|
import Dots from '../../assets/dots.png'
|
2023-05-03 19:21:00 +00:00
|
|
|
|
import InstallQzOnSiteParent from "./InstallQzOnSiteParent";
|
2023-05-07 14:01:03 +00:00
|
|
|
|
import AccordMy from "@ui_kit/Accordion";
|
2023-04-26 17:24:19 +00:00
|
|
|
|
|
2023-05-07 14:01:03 +00:00
|
|
|
|
type isExpanded = "panel1" | "panel2"
|
2023-04-26 17:24:19 +00:00
|
|
|
|
|
|
|
|
|
export default function OnButtonInstall () {
|
|
|
|
|
const theme = useTheme();
|
2023-05-03 19:21:00 +00:00
|
|
|
|
|
2023-05-07 14:01:03 +00:00
|
|
|
|
const [isExpanded, setIsExpanded] = useState<isExpanded>("panel1");
|
2023-04-26 17:24:19 +00:00
|
|
|
|
return (
|
|
|
|
|
<>
|
2023-05-03 19:21:00 +00:00
|
|
|
|
<InstallQzOnSiteParent>
|
2023-04-26 17:24:19 +00:00
|
|
|
|
{/*левая часть*/}
|
|
|
|
|
<Box sx={{maxWidth: '560px'}}>
|
|
|
|
|
{/*бокс с кнопкой*/}
|
|
|
|
|
<Box
|
|
|
|
|
sx={{
|
|
|
|
|
border: '1.5px solid #9A9AAF',
|
|
|
|
|
borderRadius: '6px',
|
|
|
|
|
maxWidth: '560px',
|
2023-05-03 19:21:00 +00:00
|
|
|
|
height: '364px',
|
|
|
|
|
// height: '100%'
|
2023-04-26 17:24:19 +00:00
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<Box
|
|
|
|
|
sx={{background: theme.palette.background.default,
|
|
|
|
|
borderBottom: '1.5px solid #9A9AAF',
|
|
|
|
|
borderRadius: '6px 6px 0px 0px',
|
|
|
|
|
minHeight: '34px',
|
|
|
|
|
display: 'flex',
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
justifyContent: 'end',
|
|
|
|
|
paddingRight: '10px'
|
|
|
|
|
}}
|
|
|
|
|
> <img src={Dots}/></Box>
|
|
|
|
|
<Box
|
|
|
|
|
sx={{display: 'flex',
|
|
|
|
|
justifyContent: 'center',
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
height: '100%'
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<Button variant='contained'>Пройти тест</Button>
|
|
|
|
|
</Box>
|
|
|
|
|
</Box>
|
2023-12-30 20:31:49 +00:00
|
|
|
|
<Typography sx={{fontSize: '14px', color: theme.palette.grey2.main}}>Если quiz уже установлен на сайт, и вы что-то здесь изменили,
|
2023-04-26 17:24:19 +00:00
|
|
|
|
код на сайте нужно будет поменять. Настройки в этом конструкторе не сохраняются.
|
|
|
|
|
</Typography>
|
|
|
|
|
</Box>
|
|
|
|
|
{/*правая часть*/}
|
|
|
|
|
<Box sx={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
flexDirection: 'column',
|
2023-05-07 14:01:03 +00:00
|
|
|
|
width: "100%"
|
2023-04-26 17:24:19 +00:00
|
|
|
|
}}>
|
2023-05-07 14:01:03 +00:00
|
|
|
|
<AccordMy header={"Конструктор кнопки"} isExpanded={isExpanded === "panel1"} onClick={() => setIsExpanded("panel1")} sx={{display: "flex", flexDirection: 'column',}}>
|
2023-05-03 19:21:00 +00:00
|
|
|
|
<Box
|
|
|
|
|
sx={{
|
|
|
|
|
display: 'flex',
|
2023-05-07 14:01:03 +00:00
|
|
|
|
gap: '40px',
|
2023-05-03 19:21:00 +00:00
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<Typography sx={{color: theme.palette.grey2.main}}>Цвет кнопки</Typography>
|
|
|
|
|
<Box sx={{width: "20px", height: "20px", borderRadius: "50%", backgroundColor: theme.palette.brightPurple.main, border: "1px solid #4D4D4D"}}> </Box>
|
|
|
|
|
<Typography sx={{color: theme.palette.grey2.main}}>Цвет текста кнопки</Typography>
|
|
|
|
|
<Box sx={{width: "20px", height: "20px", borderRadius: "50%", backgroundColor: "#ffffff", border: "1px solid #4D4D4D"}}> </Box>
|
|
|
|
|
</Box>
|
|
|
|
|
<CustomCheckbox label={'Отключить на мобильных устройствах'}/>
|
|
|
|
|
<CustomCheckbox label={'Закругленная'}/>
|
|
|
|
|
<CustomCheckbox label={'С тенью'}/>
|
|
|
|
|
<CustomCheckbox label={'С бликом'}/>
|
|
|
|
|
<CustomCheckbox label={'Фиксированная'}/>
|
|
|
|
|
<Typography sx={{color: theme.palette.grey2.main, marginBottom: '14px'}}>Текст кнопки</Typography>
|
|
|
|
|
<CustomTextField placeholder={'Пройти тест'}/>
|
2023-05-07 14:01:03 +00:00
|
|
|
|
</AccordMy>
|
|
|
|
|
<AccordMy header={"Своя кнопка"} isExpanded={isExpanded === "panel2"} onClick={() => setIsExpanded("panel2")} sx={{display: "flex", flexDirection: 'column', width: "100%"}}>
|
|
|
|
|
<Typography sx={{color: theme.palette.grey2.main}}>Ссылка для вашей кнопки</Typography>
|
|
|
|
|
<CustomTextField placeholder={""} text={"#popup:639727c5177be5004f11a0f2"} />
|
|
|
|
|
<Typography sx={{color: theme.palette.grey2.main}}>Или событие</Typography>
|
|
|
|
|
<CustomTextField placeholder={""} text={"onclick=\":639727c5177be5004f11a0f2"} />
|
|
|
|
|
</AccordMy>
|
2023-05-03 19:21:00 +00:00
|
|
|
|
|
2023-04-26 17:24:19 +00:00
|
|
|
|
<Link
|
|
|
|
|
component='button'
|
|
|
|
|
// onClick={}
|
|
|
|
|
sx={{
|
|
|
|
|
fontSize: "16px",
|
2023-05-03 19:21:00 +00:00
|
|
|
|
padding: "15px 0",
|
2023-04-26 17:24:19 +00:00
|
|
|
|
lineHeight: "19px",
|
|
|
|
|
color: theme.palette.brightPurple.main,
|
|
|
|
|
textDecorationColor: theme.palette.brightPurple.main,
|
|
|
|
|
textAlign: 'left'
|
2023-12-30 20:31:49 +00:00
|
|
|
|
}}>+ Автооткрытие quiz</Link>
|
2023-04-26 17:24:19 +00:00
|
|
|
|
</Box>
|
2023-05-03 19:21:00 +00:00
|
|
|
|
</InstallQzOnSiteParent>
|
2023-04-26 17:24:19 +00:00
|
|
|
|
</>
|
|
|
|
|
)
|
|
|
|
|
}
|