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

72 lines
1.9 KiB
TypeScript
Raw Normal View History

2024-04-08 14:05:38 +00:00
import { Box, useMediaQuery, useTheme } from "@mui/material";
2024-04-09 13:07:42 +00:00
import { FC } from "react";
import { StepButtonsBlock } from "../StepButtonsBlock/StepButtonsBlock";
2024-04-08 14:05:38 +00:00
import { CustomSelect } from "../../../../components/CustomSelect/CustomSelect";
2024-04-09 13:07:42 +00:00
import { CustomRadioGroup } from "../../../../components/CustomRadioGroup/CustomRadioGroup";
2024-05-24 21:23:55 +00:00
type AmoStep2Props = {
handlePrevStep: () => void;
handleNextStep: () => void;
selectedPipelinePerformer: string | null;
setSelectedPipelinePerformer: (value: string | null) => void;
selectedPipeline: string | null;
setSelectedPipeline: (value: string | null) => void;
};
2024-05-24 21:23:55 +00:00
export const AmoStep2: FC<AmoStep2Props> = ({
handlePrevStep,
handleNextStep,
selectedPipelinePerformer,
setSelectedPipelinePerformer,
selectedPipeline,
setSelectedPipeline,
}) => {
const theme = useTheme();
2024-04-08 14:05:38 +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 }}>
2024-04-08 14:05:38 +00:00
<CustomSelect
selectedItem={selectedPipelinePerformer}
setSelectedItem={setSelectedPipelinePerformer}
2024-05-20 18:15:36 +00:00
type={"typeUsers"}
2024-04-09 13:07:42 +00:00
/>
</Box>
<Box
sx={{
marginTop: "20px",
flexGrow: 1,
width: "100%",
height: "346px",
}}
>
<CustomRadioGroup
selectedValue={selectedPipeline}
setSelectedValue={setSelectedPipeline}
type={"typePipelines"}
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-08 14:05:38 +00:00
/>
</Box>
</Box>
);
};