особый текстфилд применяет дизайн
This commit is contained in:
parent
7312f0e941
commit
4098f19a52
@ -8,6 +8,7 @@ import { quizThemes } from "@utils/themes/Publication/themePublication";
|
|||||||
import type { ChangeEvent, FC } from "react";
|
import type { ChangeEvent, FC } from "react";
|
||||||
import type { QuizQuestionText } from "@model/questionTypes/text";
|
import type { QuizQuestionText } from "@model/questionTypes/text";
|
||||||
import { useQuizStore } from "@/stores/useQuizStore";
|
import { useQuizStore } from "@/stores/useQuizStore";
|
||||||
|
import CustomTextField from "@/ui_kit/CustomTextField";
|
||||||
|
|
||||||
const TextField = MuiTextField as unknown as FC<TextFieldProps>; // temporary fix ts(2590)
|
const TextField = MuiTextField as unknown as FC<TextFieldProps>; // temporary fix ts(2590)
|
||||||
|
|
||||||
@ -93,33 +94,22 @@ export const TextSpecial = ({ currentQuestion, answer, stepNumber }: TextSpecial
|
|||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
{
|
<CustomTextField
|
||||||
<TextField
|
placeholder={currentQuestion.content.placeholder}
|
||||||
autoFocus={true}
|
value={answer || ""}
|
||||||
multiline
|
onChange={onInputChange}
|
||||||
maxRows={4}
|
sx={{
|
||||||
placeholder={currentQuestion.content.placeholder}
|
"& .MuiOutlinedInput-root": {
|
||||||
value={answer || ""}
|
|
||||||
onChange={onInputChange}
|
|
||||||
inputProps={{
|
|
||||||
maxLength: 400,
|
|
||||||
background: settings.cfg.design
|
background: settings.cfg.design
|
||||||
? quizThemes[settings.cfg.theme].isLight
|
? quizThemes[settings.cfg.theme].isLight
|
||||||
? "#F2F3F7"
|
? "#F2F3F7"
|
||||||
: "rgba(154,154,175, 0.2)"
|
: "rgba(255,255,255, 0.3)"
|
||||||
: "transparent",
|
: "transparent",
|
||||||
}}
|
},
|
||||||
sx={{
|
"& .MuiOutlinedInput-notchedOutline": { borderColor: "#9A9AAF" },
|
||||||
width: "100%",
|
"&:focus-visible": { borderColor: theme.palette.primary.main },
|
||||||
"& .MuiOutlinedInput-root": {
|
}}
|
||||||
backgroundColor: settings.cfg.design ? "rgba(154,154,175, 0.2)" : "#FFFFFF",
|
/>
|
||||||
},
|
|
||||||
"&:focus-visible": {
|
|
||||||
borderColor: theme.palette.primary.main,
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
</Box>
|
</Box>
|
||||||
{!isHorizontal && currentQuestion.content.back && currentQuestion.content.back !== " " && (
|
{!isHorizontal && currentQuestion.content.back && currentQuestion.content.back !== " " && (
|
||||||
<Box
|
<Box
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import { quizThemes } from "@utils/themes/Publication/themePublication";
|
|||||||
import type { ChangeEvent, FC } from "react";
|
import type { ChangeEvent, FC } from "react";
|
||||||
import type { QuizQuestionText } from "@model/questionTypes/text";
|
import type { QuizQuestionText } from "@model/questionTypes/text";
|
||||||
import { useQuizStore } from "@/stores/useQuizStore";
|
import { useQuizStore } from "@/stores/useQuizStore";
|
||||||
|
import CustomTextField from "@/ui_kit/CustomTextField";
|
||||||
|
|
||||||
const TextField = MuiTextField as unknown as FC<TextFieldProps>; // temporary fix ts(2590)
|
const TextField = MuiTextField as unknown as FC<TextFieldProps>; // temporary fix ts(2590)
|
||||||
|
|
||||||
@ -66,33 +67,22 @@ export const TextSpecialHorisontal = ({ currentQuestion, answer, stepNumber }: T
|
|||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
{
|
<CustomTextField
|
||||||
<TextField
|
placeholder={currentQuestion.content.placeholder}
|
||||||
autoFocus={true}
|
value={answer || ""}
|
||||||
multiline
|
onChange={onInputChange}
|
||||||
maxRows={4}
|
sx={{
|
||||||
placeholder={currentQuestion.content.placeholder}
|
"& .MuiOutlinedInput-root": {
|
||||||
value={answer || ""}
|
|
||||||
onChange={onInputChange}
|
|
||||||
inputProps={{
|
|
||||||
maxLength: 400,
|
|
||||||
background: settings.cfg.design
|
background: settings.cfg.design
|
||||||
? quizThemes[settings.cfg.theme].isLight
|
? quizThemes[settings.cfg.theme].isLight
|
||||||
? "#F2F3F7"
|
? "#F2F3F7"
|
||||||
: "rgba(154,154,175, 0.2)"
|
: "rgba(255,255,255, 0.3)"
|
||||||
: "transparent",
|
: "transparent",
|
||||||
}}
|
},
|
||||||
sx={{
|
"& .MuiOutlinedInput-notchedOutline": { borderColor: "#9A9AAF" },
|
||||||
width: "100%",
|
"&:focus-visible": { borderColor: theme.palette.primary.main },
|
||||||
"& .MuiOutlinedInput-root": {
|
}}
|
||||||
backgroundColor: settings.cfg.design ? "rgba(154,154,175, 0.2)" : "#FFFFFF",
|
/>
|
||||||
},
|
|
||||||
"&:focus-visible": {
|
|
||||||
borderColor: theme.palette.primary.main,
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
</Box>
|
</Box>
|
||||||
{!isHorizontal && currentQuestion.content.back && currentQuestion.content.back !== " " && (
|
{!isHorizontal && currentQuestion.content.back && currentQuestion.content.back !== " " && (
|
||||||
<Box
|
<Box
|
||||||
|
|||||||
@ -12,7 +12,7 @@ const isProduction = !(
|
|||||||
);
|
);
|
||||||
|
|
||||||
//туризм больше не в исключениях
|
//туризм больше не в исключениях
|
||||||
if (!isProduction) domain = "https://hbpn.link";
|
if (!isProduction) domain = "https://s.hbpn.link";
|
||||||
// domain = "https://hbpn.link";
|
// domain = "https://hbpn.link";
|
||||||
|
|
||||||
export { domain, isProduction };
|
export { domain, isProduction };
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@frontend/squzanswerer",
|
"name": "@frontend/squzanswerer",
|
||||||
"version": "1.0.61",
|
"version": "1.0.62",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist-package/index.js",
|
"main": "./dist-package/index.js",
|
||||||
"module": "./dist-package/index.js",
|
"module": "./dist-package/index.js",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user