32 lines
847 B
TypeScript
32 lines
847 B
TypeScript
import { useQuizSettings } from "@contexts/QuizDataContext";
|
|
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 } = useQuizSettings();
|
|
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>
|
|
);
|
|
}
|