frontPanel/src/pages/Questions/PageOptions/PageOptions.tsx

67 lines
1.9 KiB
TypeScript
Raw Normal View History

2023-04-15 09:10:59 +00:00
import { Box, Typography, useTheme } from "@mui/material";
import ButtonsOptions from "../ButtonsOptions";
import React from "react";
import CustomTextField from "@ui_kit/CustomTextField";
import AddImage from "../../../assets/icons/questionsPage/addImage";
import AddVideofile from "../../../assets/icons/questionsPage/addVideofile";
import SwitchPageOptions from "./switchPageOptions";
2023-04-15 09:10:59 +00:00
type Props = {
disableInput?: boolean;
2023-08-12 08:31:21 +00:00
totalIndex: number;
2023-04-15 09:10:59 +00:00
};
export default function PageOptions({ disableInput, totalIndex }: Props) {
2023-04-15 09:10:59 +00:00
const theme = useTheme();
const [switchState, setSwitchState] = React.useState("setting");
const SSHC = (data: string) => {
setSwitchState(data);
};
return (
<>
<Box
sx={{
width: "100%",
maxWidth: "640px",
display: "flex",
padding: "20px",
flexDirection: "column",
gap: "20px",
}}
>
<Box sx={{ display: disableInput ? "none" : "" }}>
<CustomTextField placeholder={"Можно добавить текст"} text={""} />
</Box>
<Box sx={{ display: "flex", alignItems: "center", gap: "12px" }}>
<AddImage />
<Typography
sx={{
fontWeight: 400,
fontSize: "16px",
lineHeight: "18.96px",
color: theme.palette.grey2.main,
}}
>
Изображение
</Typography>
<Typography> или</Typography>
<AddVideofile />
<Typography
sx={{
fontWeight: 400,
fontSize: "16px",
lineHeight: "18.96px",
color: theme.palette.grey2.main,
}}
>
Видео
</Typography>
</Box>
</Box>
2023-08-12 08:31:21 +00:00
<ButtonsOptions switchState={switchState} SSHC={SSHC} totalIndex={totalIndex} />
2023-04-15 09:10:59 +00:00
<SwitchPageOptions switchState={switchState} />
</>
);
}