File tree Expand file tree Collapse file tree
library-authoring/containers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ interface DeleteModalProps {
1818 variant ?: string ;
1919 btnLabel ?: string ;
2020 icon ?: React . ElementType ;
21+ buttonVariant ?: 'tertiary' | 'brand' | 'primary' | 'danger' ;
22+ cancelButtonVariant ?: 'tertiary' | 'brand' | 'primary' | 'default' ;
2123}
2224
2325const DeleteModal = ( {
@@ -28,6 +30,8 @@ const DeleteModal = ({
2830 title,
2931 description,
3032 variant = 'default' ,
33+ buttonVariant = 'danger' ,
34+ cancelButtonVariant = 'default' ,
3135 btnLabel,
3236 icon,
3337} : DeleteModalProps ) => {
@@ -47,7 +51,7 @@ const DeleteModal = ({
4751 footerNode = { (
4852 < ActionRow >
4953 < Button
50- variant = "tertiary"
54+ variant = { cancelButtonVariant }
5155 onClick = { ( e ) => {
5256 e . preventDefault ( ) ;
5357 e . stopPropagation ( ) ;
@@ -62,7 +66,7 @@ const DeleteModal = ({
6266 e . stopPropagation ( ) ;
6367 await onDeleteSubmit ( ) ;
6468 } }
65- variant = "brand"
69+ variant = { buttonVariant }
6670 label = { defaultBtnLabel }
6771 />
6872 </ ActionRow >
Original file line number Diff line number Diff line change @@ -79,6 +79,8 @@ const ContainerRemover = ({
7979 title = { removeWarningTitle }
8080 description = { removeText }
8181 onDeleteSubmit = { onRemove }
82+ buttonVariant = "primary"
83+ cancelButtonVariant = "tertiary"
8284 btnLabel = { intl . formatMessage ( messages . removeContainerButton , {
8385 containerName : itemType . charAt ( 0 ) . toUpperCase ( ) + itemType . slice ( 1 ) ,
8486 } ) }
You can’t perform that action at this time.
0 commit comments