29 lines
887 B
TypeScript
29 lines
887 B
TypeScript
![]() |
import {Button, useTheme} from "@mui/material";
|
|||
|
import { quizThemes } from "@utils/themes/Publication/themePublication";
|
|||
|
import { useQuizData } from "@contexts/QuizDataContext";
|
|||
|
|
|||
|
interface Props{
|
|||
|
isNextButtonEnabled: boolean,
|
|||
|
moveToNextQuestion: () => void,
|
|||
|
}
|
|||
|
|
|||
|
export default function NextButton ({isNextButtonEnabled, moveToNextQuestion}: Props) {
|
|||
|
const theme = useTheme();
|
|||
|
const { settings } = useQuizData();
|
|||
|
return(
|
|||
|
<Button
|
|||
|
disabled={!isNextButtonEnabled}
|
|||
|
variant="contained"
|
|||
|
sx={{
|
|||
|
fontSize: "16px",
|
|||
|
padding: "10px 15px",
|
|||
|
"&:disabled": {
|
|||
|
background: quizThemes[settings.cfg.theme].isLight ? "#F2F3F7" : "#FFFFFF26"
|
|||
|
},
|
|||
|
}}
|
|||
|
onClick={moveToNextQuestion}
|
|||
|
>
|
|||
|
Далее →
|
|||
|
</Button>
|
|||
|
)}
|