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

32 lines
865 B
TypeScript
Raw Normal View History

2025-05-01 13:15:54 +00:00
import { useQuizStore } from "@/stores/useQuizStore";
import { Button } from "@mui/material";
2024-03-26 00:06:54 +00:00
import { quizThemes } from "@utils/themes/Publication/themePublication";
2025-04-20 15:16:22 +00:00
import { useTranslation } from "react-i18next";
2024-03-26 00:06:54 +00:00
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) {
2025-05-01 13:15:54 +00:00
const { settings } = useQuizStore();
2025-04-20 15:16:22 +00:00
const { t } = useTranslation();
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}
>
2025-05-01 13:23:10 +00:00
далее {/* {t("Next")} → (*.*) */}
2024-05-31 16:41:18 +00:00
</Button>
);
}