67 lines
1.5 KiB
TypeScript
67 lines
1.5 KiB
TypeScript
"use client";
|
|
|
|
import { FC } from "react";
|
|
import {
|
|
Grid,
|
|
Button,
|
|
Dialog as MUIDialog,
|
|
DialogActions,
|
|
DialogContent,
|
|
TextField,
|
|
Autocomplete,
|
|
} from "@mui/material";
|
|
import { typography } from "../styles/theme";
|
|
|
|
interface DialogProps {
|
|
title: string;
|
|
open: boolean;
|
|
closeDialog: () => void;
|
|
children?: any;
|
|
}
|
|
|
|
export const Dialog: FC<DialogProps> = ({
|
|
title,
|
|
open,
|
|
closeDialog,
|
|
children,
|
|
}) => {
|
|
return (
|
|
<MUIDialog open={open} maxWidth="md" fullWidth>
|
|
<DialogContent>{children}</DialogContent>
|
|
<DialogActions sx={{ px: 3, pt: 0, pb: 3 }}>
|
|
<Grid container justifyContent="space-between">
|
|
<Grid item>
|
|
<Button
|
|
sx={{
|
|
backgroundColor: "white",
|
|
color: "#666",
|
|
fontFamily: "Poppins, sans-serif",
|
|
fontWeight: 700,
|
|
borderRadius: 2,
|
|
textTransform: "none",
|
|
}}
|
|
onClick={() => {
|
|
closeDialog();
|
|
}}
|
|
>
|
|
Cancel
|
|
</Button>
|
|
</Grid>
|
|
<Grid item>
|
|
<Button
|
|
sx={{
|
|
fontFamily: "Poppins, sans-serif",
|
|
fontWeight: 700,
|
|
borderRadius: 2,
|
|
textTransform: "none",
|
|
px: 3,
|
|
}}
|
|
>
|
|
Create Ticket
|
|
</Button>
|
|
</Grid>
|
|
</Grid>
|
|
</DialogActions>
|
|
</MUIDialog>
|
|
);
|
|
};
|