aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/components/ConfirmDialog.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/components/ConfirmDialog.tsx')
-rw-r--r--frontend/src/components/ConfirmDialog.tsx51
1 files changed, 27 insertions, 24 deletions
diff --git a/frontend/src/components/ConfirmDialog.tsx b/frontend/src/components/ConfirmDialog.tsx
index 44a653b..8f2ce7a 100644
--- a/frontend/src/components/ConfirmDialog.tsx
+++ b/frontend/src/components/ConfirmDialog.tsx
@@ -1,31 +1,34 @@
1import React from 'react'; 1import React from "react";
2
3import "@css/Dialog.css"
4 2
5interface ConfirmDialogProps { 3interface ConfirmDialogProps {
6 title: string; 4 title: string;
7 subtitle: string; 5 subtitle: string;
8 onConfirm: () => void; 6 onConfirm: () => void;
9 onCancel: () => void; 7 onCancel: () => void;
10}; 8}
11 9
12const ConfirmDialog: React.FC<ConfirmDialogProps> = ({ title, subtitle, onConfirm, onCancel }) => { 10const ConfirmDialog: React.FC<ConfirmDialogProps> = ({
13 return ( 11 title,
14 <div className='dimmer'> 12 subtitle,
15 <div className='dialog'> 13 onConfirm,
16 <div className='dialog-element dialog-header'> 14 onCancel,
17 <span>{title}</span> 15}) => {
18 </div> 16 return (
19 <div className='dialog-element dialog-description'> 17 <div className="fixed w-[200%] h-full bg-black bg-opacity-50 z-[4]">
20 <span>{subtitle}</span> 18 <div className="fixed z-[4] top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 bg-surface rounded-3xl overflow-hidden min-w-[350px] border border-border animate-[dialog_in_0.2s_cubic-bezier(0.075,0.82,0.165,1.1)] text-foreground font-[--font-barlow-semicondensed-regular]">
21 </div> 19 <div className="p-2 text-2xl bg-mantle">
22 <div className='dialog-element dialog-btns-container'> 20 <span>{title}</span>
23 <button onClick={onCancel}>Cancel</button> 21 </div>
24 <button onClick={onConfirm}>Confirm</button> 22 <div className="p-2">
25 </div> 23 <span>{subtitle}</span>
26 </div> 24 </div>
25 <div className="p-2 flex justify-end border-t-2 border-border bg-mantle">
26 <button className="mr-2 px-4 py-2 bg-muted text-foreground rounded hover:bg-overlay1 transition-colors" onClick={onCancel}>Cancel</button>
27 <button className="px-4 py-2 bg-primary text-background rounded hover:bg-mauve transition-colors" onClick={onConfirm}>Confirm</button>
27 </div> 28 </div>
28 ) 29 </div>
30 </div>
31 );
29}; 32};
30 33
31export default ConfirmDialog; 34export default ConfirmDialog;