File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
library-authoring/containers Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ interface DeleteModalProps {
18
18
variant ?: string ;
19
19
btnLabel ?: string ;
20
20
icon ?: React . ElementType ;
21
+ buttonVariant ?: 'tertiary' | 'brand' | 'primary' | 'danger' ;
22
+ cancelButtonVariant ?: 'tertiary' | 'brand' | 'primary' | 'default' ;
21
23
}
22
24
23
25
const DeleteModal = ( {
@@ -28,6 +30,8 @@ const DeleteModal = ({
28
30
title,
29
31
description,
30
32
variant = 'default' ,
33
+ buttonVariant = 'danger' ,
34
+ cancelButtonVariant = 'default' ,
31
35
btnLabel,
32
36
icon,
33
37
} : DeleteModalProps ) => {
@@ -47,7 +51,7 @@ const DeleteModal = ({
47
51
footerNode = { (
48
52
< ActionRow >
49
53
< Button
50
- variant = "tertiary"
54
+ variant = { cancelButtonVariant }
51
55
onClick = { ( e ) => {
52
56
e . preventDefault ( ) ;
53
57
e . stopPropagation ( ) ;
@@ -62,7 +66,7 @@ const DeleteModal = ({
62
66
e . stopPropagation ( ) ;
63
67
await onDeleteSubmit ( ) ;
64
68
} }
65
- variant = "brand"
69
+ variant = { buttonVariant }
66
70
label = { defaultBtnLabel }
67
71
/>
68
72
</ ActionRow >
Original file line number Diff line number Diff line change @@ -79,6 +79,8 @@ const ContainerRemover = ({
79
79
title = { removeWarningTitle }
80
80
description = { removeText }
81
81
onDeleteSubmit = { onRemove }
82
+ buttonVariant = "primary"
83
+ cancelButtonVariant = "tertiary"
82
84
btnLabel = { intl . formatMessage ( messages . removeContainerButton , {
83
85
containerName : itemType . charAt ( 0 ) . toUpperCase ( ) + itemType . slice ( 1 ) ,
84
86
} ) }
You can’t perform that action at this time.
0 commit comments