add textButton to SideWidget

This commit is contained in:
Nastya 2024-12-21 21:51:46 +03:00
parent f358a959bf
commit 8465e3df70
2 changed files with 7 additions and 2 deletions

@ -6,6 +6,7 @@ export interface SideWidgetComponentProps {
dialogDimensions?: { width: string; height: string }; dialogDimensions?: { width: string; height: string };
fullScreen?: boolean; fullScreen?: boolean;
buttonFlash?: boolean; buttonFlash?: boolean;
buttonText?: string;
/** /**
* Показывать виджет через X секунд * Показывать виджет через X секунд
*/ */

@ -19,6 +19,7 @@ export default function QuizSideButton({
buttonTextColor, buttonTextColor,
dialogDimensions, dialogDimensions,
fullScreen = false, fullScreen = false,
buttonText,
buttonFlash = false, buttonFlash = false,
autoShowWidgetTime = 0, autoShowWidgetTime = 0,
autoShowQuizTime = null, autoShowQuizTime = null,
@ -89,7 +90,10 @@ export default function QuizSideButton({
}, },
]} ]}
/> />
<Fade in={!isWidgetHidden} timeout={400}> <Fade
in={!isWidgetHidden}
timeout={400}
>
<Button <Button
className="pena-quiz-widget-button" className="pena-quiz-widget-button"
variant="contained" variant="contained"
@ -116,7 +120,7 @@ export default function QuizSideButton({
}, },
]} ]}
> >
Пройти квиз {buttonText || "Пройти квиз"}
{showButtonFlash && <RunningStripe />} {showButtonFlash && <RunningStripe />}
</Button> </Button>
</Fade> </Fade>