форма контактов при количестве полей менее 2 по макету

This commit is contained in:
Tamara 2024-04-10 20:49:47 +03:00
parent 6fce3b3edb
commit f9656e6802

@ -107,7 +107,7 @@ export const ContactForm = ({ currentQuestion, onShowResult }: Props) => {
filteredFC[i] = field;
}
}
const isWide = Object.keys(filteredFC).length > 2;
async function handleShowResultsClick() {
const FC: any = settings.cfg.formContact.fields;
@ -178,22 +178,22 @@ export const ContactForm = ({ currentQuestion, onShowResult }: Props) => {
>
<Box
sx={{
width: isWide && !isMobile ? "100%" : isMobile ? undefined : "530px",
width: !isMobile ? "100%" : isMobile ? undefined : "530px",
borderRadius: "4px",
height: "100%",
minHeight: "100%",
display: isWide && !isMobile ? "flex" : undefined,
display: isMobile ? undefined : "flex",
background: settings.cfg.design && !isMobile ? undefined : theme.palette.background.default,
}}
>
<Box
sx={{
width: isWide && !isMobile ? "100%" : undefined,
width: isMobile ? undefined : "100%",
display: "flex",
flexDirection: "column",
alignItems: "center",
justifyContent: "center",
borderRight: isWide && !isMobile ? "1px solid #9A9AAF80" : undefined,
borderRight: isMobile ? undefined : "1px solid #9A9AAF80",
margin: isMobile ? 0 : "40px 0"
}}
>