From ab0f53e0615e6409d3257338f25c18c1b5f4593f Mon Sep 17 00:00:00 2001 From: Tamara Date: Thu, 14 Mar 2024 19:09:40 +0300 Subject: [PATCH] =?UTF-8?q?=D1=84=D0=BA=20=D0=B8=20=D1=80=D0=B5=D0=B7?= =?UTF-8?q?=D1=83=D0=BB=D1=8C=D1=82=D0=B0=D1=82=D1=8B=20=D0=BF=D1=80=D0=B8?= =?UTF-8?q?=D0=B1=D0=BB=D0=B8=D0=B6=D0=B5=D0=BD=D1=8B=20=D0=BA=20=D0=BC?= =?UTF-8?q?=D0=B0=D0=BA=D0=B5=D1=82=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../icons/ContactFormIcon/AddressIcon.tsx | 10 ++- .../icons/ContactFormIcon/EmailIcon.tsx | 10 ++- lib/assets/icons/ContactFormIcon/NameIcon.tsx | 8 ++- .../icons/ContactFormIcon/PhoneIcon.tsx | 16 +++-- lib/assets/icons/ContactFormIcon/TextIcon.tsx | 8 ++- .../ViewPublicationPage/ContactForm.tsx | 64 ++++++++++++------- .../ViewPublicationPage/ResultForm.tsx | 3 +- .../ViewPublicationPage.tsx | 2 +- 8 files changed, 85 insertions(+), 36 deletions(-) diff --git a/lib/assets/icons/ContactFormIcon/AddressIcon.tsx b/lib/assets/icons/ContactFormIcon/AddressIcon.tsx index 9918ee4..66ba584 100644 --- a/lib/assets/icons/ContactFormIcon/AddressIcon.tsx +++ b/lib/assets/icons/ContactFormIcon/AddressIcon.tsx @@ -2,17 +2,23 @@ import { Box } from "@mui/material"; interface Props { color: string; + backgroundColor: string } -export default function AddressIcon({ color }: Props) { +export default function AddressIcon({ color, backgroundColor }: Props) { return ( diff --git a/lib/assets/icons/ContactFormIcon/TextIcon.tsx b/lib/assets/icons/ContactFormIcon/TextIcon.tsx index b272b37..e4b1ce4 100644 --- a/lib/assets/icons/ContactFormIcon/TextIcon.tsx +++ b/lib/assets/icons/ContactFormIcon/TextIcon.tsx @@ -2,9 +2,10 @@ import { Box } from "@mui/material"; interface Props { color: string; + backgroundColor: string } -export default function TextIcon({ color }: Props) { +export default function TextIcon({ color, backgroundColor }: Props) { return ( { borderRight: isWide && !isMobile ? "1px solid gray" : undefined, }} > - - {settings.cfg.formContact.title || - "Заполните форму, чтобы получить результаты теста"} - - {settings.cfg.formContact.desc && ( - {settings.cfg.formContact.desc} + {settings.cfg.formContact.title || + "Заполните форму, чтобы получить результаты теста"} - )} + {settings.cfg.formContact.desc && ( + + {settings.cfg.formContact.desc} + + )} + + { justifyContent: "center", flexDirection: "column", backgroundColor: theme.palette.background.default, - p: "30px", + p: "0px 20px 30px 20px", }} > setName(target.value)} id={name} title={FC["name"].innerText || "Введите имя"} - desc={FC["name"].text || "имя"} + desc={FC["name"].text || "Имя"} Icon={NameIcon} /> ); @@ -366,7 +378,7 @@ const Inputs = ({ onChange={({ target }) => setPhone(target.value)} id={phone} title={FC["phone"].innerText || "Введите номер телефона"} - desc={FC["phone"].text || "номер телефона"} + desc={FC["phone"].text || "Номер телефона"} Icon={PhoneIcon} /> ); @@ -375,7 +387,7 @@ const Inputs = ({ onChange={({ target }) => setText(target.value)} id={text} title={FC["text"].text || "Введите фамилию"} - desc={FC["text"].innerText || "фамилию"} + desc={FC["text"].innerText || "Фамилия"} Icon={TextIcon} /> ); @@ -384,7 +396,7 @@ const Inputs = ({ onChange={({ target }) => setAdress(target.value)} id={adress} title={FC["address"].innerText || "Введите адрес"} - desc={FC["address"].text || "адрес"} + desc={FC["address"].text || "Адрес"} Icon={AddressIcon} /> ); @@ -414,12 +426,12 @@ const CustomInput = ({ title, desc, Icon, onChange, id }: { id: string; title: string; desc: string; - Icon: FC<{ color: string; }>; + Icon: FC<{ color: string; backgroundColor: string }>; onChange: TextFieldProps["onChange"]; }) => { const theme = useTheme(); const isMobile = useRootContainerSize() < 600; - + const { settings } = useQuizData(); return ( @@ -430,15 +442,21 @@ const CustomInput = ({ title, desc, Icon, onChange, id }: { onChange={onChange} sx={{ width: isMobile ? "300px" : "350px", + backgroundColor: theme.palette.background.default, "& .MuiOutlinedInput-notchedOutline": { - borderColor: "#9A9AAF" + borderColor: "#9A9AAF80", + borderRadius: "12px" + }, + "& .MuiInputBase-root": { + paddingLeft: 0 } + }} placeholder={desc} InputProps={{ startAdornment: ( - + ), }} diff --git a/lib/components/ViewPublicationPage/ResultForm.tsx b/lib/components/ViewPublicationPage/ResultForm.tsx index d28cf83..1eae9e7 100644 --- a/lib/components/ViewPublicationPage/ResultForm.tsx +++ b/lib/components/ViewPublicationPage/ResultForm.tsx @@ -170,12 +170,13 @@ export const ResultForm = ({ resultQuestion }: ResultFormProps) => {