44 lines
1.1 KiB
TypeScript
44 lines
1.1 KiB
TypeScript
|
import * as React from 'react';
|
||
|
import Box from '@mui/material/Box';
|
||
|
import Button from '@mui/material/Button';
|
||
|
import Typography from '@mui/material/Typography';
|
||
|
import Modal from '@mui/material/Modal';
|
||
|
import { AddAppModal } from './Modal';
|
||
|
import { SiteBunt } from '../logic/types';
|
||
|
// import { ColorToggle, ThemeTest } from "../ui/theme";
|
||
|
|
||
|
const style = {
|
||
|
position: 'absolute' as 'absolute',
|
||
|
top: '50%',
|
||
|
left: '50%',
|
||
|
transform: 'translate(-50%, -50%)',
|
||
|
width: 400,
|
||
|
bgcolor: 'background.paper',
|
||
|
border: '2px solid #000',
|
||
|
boxShadow: 24,
|
||
|
p: 4,
|
||
|
};
|
||
|
|
||
|
export default function BasicModal() {
|
||
|
const [open, setOpen] = React.useState(false);
|
||
|
const handleOpen = () => setOpen(true);
|
||
|
|
||
|
function handleClose(e: any, r: any) {
|
||
|
console.log(e);
|
||
|
console.log(r);
|
||
|
}
|
||
|
return (
|
||
|
<Box>
|
||
|
<Button onClick={handleOpen}>Open modal</Button>
|
||
|
<Modal
|
||
|
open={open}
|
||
|
onClose={handleClose}
|
||
|
aria-labelledby="modal-modal-title"
|
||
|
aria-describedby="modal-modal-description"
|
||
|
>
|
||
|
<AddAppModal kind="chat" site={SiteBunt} />
|
||
|
</Modal>
|
||
|
</Box>
|
||
|
);
|
||
|
}
|