frontPanel/src/pages/IntegrationsPage/IntegrationsModal/IntegrationStep3/IntegrationStep3.tsx

76 lines
2.0 KiB
TypeScript
Raw Normal View History

2024-04-09 13:07:42 +00:00
import { Box, useMediaQuery, useTheme } from "@mui/material";
import { FC } from "react";
import { StepButtonsBlock } from "../StepButtonsBlock/StepButtonsBlock";
2024-04-09 13:07:42 +00:00
import { CustomSelect } from "../../../../components/CustomSelect/CustomSelect";
import { CustomRadioGroup } from "../../../../components/CustomRadioGroup/CustomRadioGroup";
type IntegrationStep3Props = {
handlePrevStep: () => void;
handleNextStep: () => void;
selectedStepsPerformer: string | null;
setSelectedStepsPerformer: (value: string | null) => void;
selectedStep: string | null;
setSelectedStep: (value: string | null) => void;
2024-05-20 18:15:36 +00:00
pipelineId: string | null;
};
export const IntegrationStep3: FC<IntegrationStep3Props> = ({
handlePrevStep,
handleNextStep,
selectedStepsPerformer,
setSelectedStepsPerformer,
selectedStep,
setSelectedStep,
2024-05-20 18:15:36 +00:00
pipelineId,
}) => {
const theme = useTheme();
2024-04-09 13:07:42 +00:00
const isMobile = useMediaQuery(theme.breakpoints.down(600));
const isTablet = useMediaQuery(theme.breakpoints.down(1000));
return (
<Box
sx={{
display: "flex",
flexDirection: "column",
alignItems: "center",
height: "100%",
flexGrow: 1,
}}
>
2024-04-09 13:07:42 +00:00
<Box sx={{ width: "100%", marginTop: "20px", zIndex: 3 }}>
<CustomSelect
selectedItem={selectedStepsPerformer}
2024-05-20 18:15:36 +00:00
type={"typeUsers"}
setSelectedItem={setSelectedStepsPerformer}
2024-04-09 13:07:42 +00:00
/>
</Box>
<Box
sx={{
marginTop: "20px",
flexGrow: 1,
width: "100%",
height: "346px",
}}
>
2024-04-09 13:07:42 +00:00
<CustomRadioGroup
2024-05-20 18:15:36 +00:00
pipelineId={pipelineId}
type={"typeSteps"}
selectedValue={selectedStep}
setSelectedValue={setSelectedStep}
2024-04-09 13:07:42 +00:00
/>
</Box>
<Box
sx={{
marginTop: "20px",
alignSelf: "end",
}}
>
<StepButtonsBlock
2024-04-10 09:38:30 +00:00
onLargeBtnClick={handleNextStep}
onSmallBtnClick={handlePrevStep}
2024-04-09 13:07:42 +00:00
/>
</Box>
</Box>
);
};