side widget: add enable button flash param

This commit is contained in:
nflnkr 2024-05-07 13:12:42 +03:00
parent 9f5ec66533
commit 0ffa358585

@ -18,13 +18,22 @@ interface Props {
buttonTextColor?: string;
dimensions?: { width: string; height: string; };
fullScreen?: boolean;
buttonFlash?: boolean;
}
export default function QuizSideButton({ quizId, position, buttonBackgroundColor, buttonTextColor, dimensions, fullScreen = false }: Props) {
export default function QuizSideButton({
quizId,
position,
buttonBackgroundColor,
buttonTextColor,
dimensions,
fullScreen = false,
buttonFlash = false,
}: Props) {
const [isQuizShown, setIsQuizShown] = useState<boolean>(false);
const isMobile = useMediaQuery("(max-width: 600px)");
const isQuizCompleted = useQuizCompletionStatus(quizId);
const [isFlashEnabled, setIsFlashEnabled] = useState<boolean>(true);
const [isFlashEnabled, setIsFlashEnabled] = useState<boolean>(buttonFlash);
function openQuiz() {
setIsQuizShown(true);