import { Box } from "@mui/material"; import { notReachable } from "@utils/notReachable"; import type { QuizStartpageType } from "@model/settingsData"; type StartPageMobileProps = { quizHeaderBlock: JSX.Element; quizMainBlock: JSX.Element; backgroundBlock: JSX.Element | null; startpageType: QuizStartpageType; }; type MobileLayoutProps = Omit; const StandartMobileLayout = ({ quizHeaderBlock, quizMainBlock, backgroundBlock, }: MobileLayoutProps) => ( {quizHeaderBlock} {quizMainBlock} {backgroundBlock} ); const ExpandedMobileLayout = ({ quizHeaderBlock, quizMainBlock, backgroundBlock, }: MobileLayoutProps) => ( {quizHeaderBlock} {quizMainBlock} img": { display: "block", minHeight: "100vh", }, }} > {backgroundBlock} ); const CenteredMobileLayout = ({ quizHeaderBlock, quizMainBlock, backgroundBlock, }: MobileLayoutProps) => ( {quizHeaderBlock} img": { width: "100%", borderRadius: "12px" }, }} > {backgroundBlock} {quizMainBlock} ); export const StartPageMobile = ({ quizHeaderBlock, quizMainBlock, backgroundBlock, startpageType, }: StartPageMobileProps) => { switch (startpageType) { case null: case "standard": { return ( ); } case "expanded": { return ( ); } case "centered": { return ( ); } default: notReachable(startpageType); } };