frontAnswerer/lib/components/ViewPublicationPage/tools/NextButton.tsx

30 lines
764 B
TypeScript
Raw Normal View History

import { useQuizSettings } from "@contexts/QuizDataContext";
import { Button } from "@mui/material";
2024-03-26 00:06:54 +00:00
import { quizThemes } from "@utils/themes/Publication/themePublication";
2024-05-31 16:41:18 +00:00
interface Props {
isNextButtonEnabled: boolean;
moveToNextQuestion: () => void;
2024-03-26 00:06:54 +00:00
}
2024-05-31 16:41:18 +00:00
export default function NextButton({ isNextButtonEnabled, moveToNextQuestion }: Props) {
const { settings } = useQuizSettings();
2024-05-31 16:41:18 +00:00
return (
<Button
disabled={!isNextButtonEnabled}
variant="contained"
sx={{
fontSize: "16px",
padding: "10px 15px",
"&:disabled": {
background: quizThemes[settings.cfg.theme].isLight ? "#F2F3F7" : "#FFFFFF26",
},
}}
onClick={moveToNextQuestion}
>
Далее
</Button>
);
}