Skip to content

Commit 76b5dd5

Browse files
authored
fix: delete and remove modals styling (#2243)
1 parent 701e41b commit 76b5dd5

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/generic/delete-modal/DeleteModal.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff 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

2325
const 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>

src/library-authoring/containers/ContainerRemover.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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
})}

0 commit comments

Comments
 (0)