diff --git a/src/pages/InstallQuiz/QuizInstallationCard/WidgetSetupByType/SideWidgetSetup/SideWidgetPreviewDesktop.tsx b/src/pages/InstallQuiz/QuizInstallationCard/WidgetSetupByType/SideWidgetSetup/SideWidgetPreviewDesktop.tsx
index 742f158c..f33a4206 100644
--- a/src/pages/InstallQuiz/QuizInstallationCard/WidgetSetupByType/SideWidgetSetup/SideWidgetPreviewDesktop.tsx
+++ b/src/pages/InstallQuiz/QuizInstallationCard/WidgetSetupByType/SideWidgetSetup/SideWidgetPreviewDesktop.tsx
@@ -4,9 +4,10 @@ import RunningStripe from "@ui_kit/RunningStripe";
interface Props {
position: "left" | "right";
buttonFlash: boolean;
+ text: string;
}
-export default function SideWidgetPreviewDesktop({ buttonFlash, position }: Props) {
+export default function SideWidgetPreviewDesktop({ buttonFlash, position, text }: Props) {
return (
- Пройти квиз
+ { text || "Пройти квиз" }
{buttonFlash && }
diff --git a/src/pages/InstallQuiz/QuizInstallationCard/WidgetSetupByType/SideWidgetSetup/SideWidgetSetup.tsx b/src/pages/InstallQuiz/QuizInstallationCard/WidgetSetupByType/SideWidgetSetup/SideWidgetSetup.tsx
index 2163631f..822e6655 100644
--- a/src/pages/InstallQuiz/QuizInstallationCard/WidgetSetupByType/SideWidgetSetup/SideWidgetSetup.tsx
+++ b/src/pages/InstallQuiz/QuizInstallationCard/WidgetSetupByType/SideWidgetSetup/SideWidgetSetup.tsx
@@ -12,6 +12,7 @@ import { useWidgetUrl } from "../../useWidgetUrl";
import SideWidgetPositionButton from "./SideWidgetPositionButton";
import SideWidgetPreviewDesktop from "./SideWidgetPreviewDesktop";
import SideWidgetPreviewMobile from "./SideWidgetPreviewMobile";
+import CustomTextField from "@ui_kit/CustomTextField";
interface Props {
step: 2 | 3;
@@ -30,6 +31,7 @@ export default function SideWidgetSetup({ step, nextButton }: Props) {
const [autoShowQuizTime, setAutoShowQuizTime] = useState(10);
const [autoShowWidgetTime, setAutoShowWidgetTime] = useState(10);
const [position, setPosition] = useState("left");
+ const [buttonText, setButtonText] = useState("Пройти квиз");
const [fullScreen, setFullScreen] = useState(false);
const [buttonFlash, setButtonFlash] = useState(false);
const [buttonBackgroundColor, setButtonBackgroundColor] = useState(theme.palette.brightPurple.main);
@@ -48,13 +50,14 @@ export default function SideWidgetSetup({ step, nextButton }: Props) {
fullScreen: fullScreen || undefined,
buttonFlash: buttonFlash || undefined,
buttonTextColor,
+ buttonText: buttonText,
buttonBackgroundColor,
dialogDimensions:
!fullScreen && (widgetWidth || widgetHeight)
? {
- width: widgetWidth ? `${widgetWidth}px` : "100%",
- height: widgetHeight ? `${widgetHeight}px` : "100%",
- }
+ width: widgetWidth ? `${widgetWidth}px` : "100%",
+ height: widgetHeight ? `${widgetHeight}px` : "100%",
+ }
: undefined,
},
widgetUrl
@@ -100,6 +103,7 @@ export default function SideWidgetSetup({ step, nextButton }: Props) {
@@ -274,10 +278,20 @@ export default function SideWidgetSetup({ step, nextButton }: Props) {
- setHideOnMobile(e.target.checked)}
+ Текст кнопки
+ setButtonText(e.target.value)}
+ placeholder="Пройти тест"
+ value={buttonText}
+ sx={{
+ borderColor: theme.palette.brightPurple.main,
+ }}
+ sxForm={{
+ maxWidth: "360px",
+
+ }}
+ maxLength={17}
/>