frontAnswerer/lib/components/ViewPublicationPage/tools/NextButton.tsx
Nastya aefda2b767
All checks were successful
Deploy / CreateImage (push) Successful in 3m9s
Deploy / DeployService (push) Successful in 21s
Merge branch 'newai'
2025-05-02 16:02:33 +03:00

32 lines
865 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { useQuizStore } from "@/stores/useQuizStore";
import { Button } from "@mui/material";
import { quizThemes } from "@utils/themes/Publication/themePublication";
import { useTranslation } from "react-i18next";
interface Props {
isNextButtonEnabled: boolean;
moveToNextQuestion: () => void;
}
export default function NextButton({ isNextButtonEnabled, moveToNextQuestion }: Props) {
const { settings } = useQuizStore();
const { t } = useTranslation();
return (
<Button
disabled={!isNextButtonEnabled}
variant="contained"
sx={{
fontSize: "16px",
padding: "10px 15px",
"&:disabled": {
background: quizThemes[settings.cfg.theme].isLight ? "#F2F3F7" : "#FFFFFF26",
},
}}
onClick={moveToNextQuestion}
>
далее {/* {t("Next")} → (*.*) */}
</Button>
);
}