File tree 2 files changed +26
-0
lines changed
frontend/src/components/common
2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -26,3 +26,19 @@ ConfirmDialogClosed.args = {
26
26
title : 'A fine title' ,
27
27
description : 'A really good description.' ,
28
28
} ;
29
+
30
+ export const ConfirmDialogWithCheckbox = Template . bind ( { } ) ;
31
+ ConfirmDialogWithCheckbox . args = {
32
+ open : true ,
33
+ title : 'A fine title' ,
34
+ description : 'A really good description, only now we are using a checkbox.' ,
35
+ checkboxDescription : 'Click the checkbox.' ,
36
+ } ;
37
+
38
+ export const ConfirmDialogWithCheckboxClosed = Template . bind ( { } ) ;
39
+ ConfirmDialogWithCheckboxClosed . args = {
40
+ open : false ,
41
+ title : 'A fine title' ,
42
+ description : 'A really good description, only now we are using a checkbox.' ,
43
+ checkboxDescription : 'Click the checkbox.' ,
44
+ } ;
Original file line number Diff line number Diff line change @@ -10,8 +10,18 @@ import { useTranslation } from 'react-i18next';
10
10
import { DialogTitle } from './Dialog' ;
11
11
12
12
export interface ConfirmDialogProps extends MuiDialogProps {
13
+ /**
14
+ * Title of the dialog box
15
+ */
13
16
title : string ;
17
+ /**
18
+ * Description of the dialog box
19
+ */
14
20
description : string | React . ReactNode ;
21
+ /*
22
+ * Description of the checkbox
23
+ * Note: If this is provided, an additional description will be rendered under the original and will require the checkbox to continue action.
24
+ */
15
25
checkboxDescription ?: string ;
16
26
onConfirm : ( ) => void ;
17
27
handleClose : ( ) => void ;
You can’t perform that action at this time.
0 commit comments