fix detail member
This commit is contained in:
@ -1,23 +1,21 @@
|
||||
import React from "react";
|
||||
import Dialog from "@mui/material/Dialog";
|
||||
import DialogActions from "@mui/material/DialogActions";
|
||||
import DialogContent from "@mui/material/DialogContent";
|
||||
import DialogTitle from "@mui/material/DialogTitle";
|
||||
import Button from "@mui/material/Button";
|
||||
import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle, DialogDescription, DialogBody } from '@/components/ui/dialog';
|
||||
|
||||
const ConfirmDialog = ({ open, onClose, title, content, onYes, onNo }: any) => {
|
||||
const ConfirmDialog = ({ open, onClose, title, content, onYes, onNo, onOpenChange }: any) => {
|
||||
return (
|
||||
<Dialog open={open} onClose={onClose}>
|
||||
{title && <DialogTitle>{title}</DialogTitle>}
|
||||
{content && <DialogContent>{content}</DialogContent>}
|
||||
<DialogActions>
|
||||
<Button onClick={onNo} color="secondary">
|
||||
No
|
||||
</Button>
|
||||
<Button onClick={onYes} color="primary">
|
||||
Yes
|
||||
</Button>
|
||||
</DialogActions>
|
||||
<Dialog open={open} onOpenChange={onOpenChange}>
|
||||
<DialogContent>
|
||||
<DialogHeader>
|
||||
{title && <DialogTitle className="">{title}</DialogTitle>}
|
||||
<DialogBody>
|
||||
{content && <DialogDescription className="">{content}</DialogDescription>}
|
||||
</DialogBody>
|
||||
</DialogHeader>
|
||||
<DialogFooter className="flex justify-end gap-2 pt-4">
|
||||
<Button color="secondary" onClick={onNo}>No</Button>
|
||||
<Button color="primary" onClick={onYes}>Yes</Button>
|
||||
</DialogFooter>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
);
|
||||
};
|
||||
|
||||
16
src/components/loaders/LoaderTransparant.tsx
Normal file
16
src/components/loaders/LoaderTransparant.tsx
Normal file
@ -0,0 +1,16 @@
|
||||
import { toAbsoluteUrl } from '@/utils';
|
||||
|
||||
const LoaderTransparant = () => {
|
||||
return (
|
||||
<div className="flex flex-col items-center gap-2 justify-center fixed inset-0 z-50 bg-white bg-opacity-20 transition-opacity duration-700 ease-in-out">
|
||||
<img
|
||||
className="h-[30px] max-w-none"
|
||||
src={toAbsoluteUrl('/media/app/app-logo.png')}
|
||||
alt="logo"
|
||||
/>
|
||||
<div className="text-gray-500 font-medium text-sm">Loading...</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export { LoaderTransparant };
|
||||
@ -1,3 +1,4 @@
|
||||
export * from './ContentLoader';
|
||||
export * from './ProgressBarLoader';
|
||||
export * from './ScreenLoader';
|
||||
export * from './LoaderTransparant';
|
||||
|
||||
Reference in New Issue
Block a user