mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-06 10:21:05 +02:00
frontend: react+mui (#3004)
* mui v5 wip * wip * wip * wip * use compressor for all controlplane endpoints * wip * wip * add deps * fix authenticate URL * fix test * fix test * fix build * maybe fix build * fix integration test * remove image asset test * add yarn.lock
This commit is contained in:
parent
64d8748251
commit
2824faecbf
84 changed files with 13373 additions and 1455 deletions
30
ui/src/components/AlertDialog.tsx
Normal file
30
ui/src/components/AlertDialog.tsx
Normal file
|
@ -0,0 +1,30 @@
|
|||
import Alert, { AlertColor } from "@mui/material/Alert";
|
||||
import Dialog, { DialogProps } from "@mui/material/Dialog";
|
||||
import DialogActions from "@mui/material/DialogActions";
|
||||
import DialogContent from "@mui/material/DialogContent";
|
||||
import DialogTitle from "@mui/material/DialogTitle";
|
||||
import React, { FC } from "react";
|
||||
|
||||
export type AlertDialogProps = DialogProps & {
|
||||
title?: React.ReactNode;
|
||||
severity?: AlertColor;
|
||||
actions?: React.ReactNode;
|
||||
};
|
||||
export const AlertDialog: FC<AlertDialogProps> = ({
|
||||
title,
|
||||
severity,
|
||||
children,
|
||||
actions,
|
||||
...props
|
||||
}) => {
|
||||
return (
|
||||
<Dialog transitionDuration={{ exit: 0 }} {...props}>
|
||||
<DialogTitle>{title}</DialogTitle>
|
||||
<DialogContent>
|
||||
<Alert severity={severity || "info"}>{children}</Alert>
|
||||
</DialogContent>
|
||||
{actions ? <DialogActions>{actions}</DialogActions> : <></>}
|
||||
</Dialog>
|
||||
);
|
||||
};
|
||||
export default AlertDialog;
|
Loading…
Add table
Add a link
Reference in a new issue