frontPanel/src/pages/Questions/Branching/SwitchBranchingPanel/index.tsx

31 lines
861 B
TypeScript
Raw Normal View History

import { Box, useMediaQuery, useTheme } from "@mui/material";
import { PanelSwitchQuestionListGraph } from "@ui_kit/Toolbars/PanelSwitchQuestionListGraph";
interface Props {
openBranchingPage: boolean;
setOpenBranchingPage: () => void;
widthMain: number;
}
export const SwitchBranchingPanel = ({
openBranchingPage,
2023-12-31 02:53:25 +00:00
setOpenBranchingPage,
widthMain,
2023-12-31 02:53:25 +00:00
}: Props) => {
const theme = useTheme();
2023-12-25 15:38:40 +00:00
const isMobile = useMediaQuery(theme.breakpoints.down(660));
const isTablet = useMediaQuery(theme.breakpoints.down(1446));
return openBranchingPage ? (
<Box sx={{ userSelect: "none", maxWidth: "350px", width: "100%" }}>
{widthMain > 1216 && (
<PanelSwitchQuestionListGraph
openBranchingPage={openBranchingPage}
setOpenBranchingPage={setOpenBranchingPage}
/>
)}
</Box>
2023-12-25 15:38:40 +00:00
) : (
<></>
);
};