2023-04-17 02:27:22 +00:00
|
|
|
|
import * as React from 'react';
|
|
|
|
|
import Box from '@mui/material/Box';
|
|
|
|
|
import Button from '@mui/material/Button';
|
|
|
|
|
import {Typography, useTheme} from "@mui/material";
|
|
|
|
|
import CloseIcon from '@mui/icons-material/Close';
|
|
|
|
|
import ButtonsNewField from "./ButtonsNewField";
|
|
|
|
|
import SwitchNewField from "./SwitchNewField";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default function WindowNewField() {
|
|
|
|
|
const theme = useTheme();
|
2023-05-03 19:21:00 +00:00
|
|
|
|
const [switchState, setSwitchState] = React.useState('name');
|
2023-04-17 02:27:22 +00:00
|
|
|
|
const SSHC = (data: string) => {
|
|
|
|
|
setSwitchState(data)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return(
|
|
|
|
|
<>
|
2023-05-03 19:21:00 +00:00
|
|
|
|
<Box sx={{padding: '10px 10px 10px 20px', display: 'flex', justifyContent: 'space-between', alignItems: 'center', background: theme.palette.background.default}}>
|
2023-04-17 02:27:22 +00:00
|
|
|
|
<Typography>Новое поле</Typography>
|
|
|
|
|
<Button sx={{padding: 0}}><CloseIcon fontSize='large'/></Button>
|
|
|
|
|
</Box>
|
|
|
|
|
|
|
|
|
|
<Box><ButtonsNewField switchState={switchState} SSHC={SSHC}/></Box>
|
|
|
|
|
<SwitchNewField switchState={switchState}/>
|
|
|
|
|
</>
|
|
|
|
|
)
|
|
|
|
|
}
|