blob: c4299fd4f28b016d2d7ef1b8a132e6ad918b458e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
import React from 'react';
import "../css/Dialog.css"
interface ConfirmDialogProps {
title: string;
subtitle: string;
onConfirm: () => void;
onCancel: () => void;
};
const ConfirmDialog: React.FC<ConfirmDialogProps> = ({ title, subtitle, onConfirm, onCancel }) => {
return (
<div className='dimmer'>
<div className='dialog'>
<div className='dialog-element dialog-header'>
<span>{title}</span>
</div>
<div className='dialog-element dialog-description'>
<span>{subtitle}</span>
</div>
<div className='dialog-element dialog-btns-container'>
<button onClick={onCancel}>Cancel</button>
<button onClick={onConfirm}>Confirm</button>
</div>
</div>
</div>
)
};
export default ConfirmDialog;
|