Skip to content

Commit 8351a7c

Browse files
authored
Fix Modal Props actions to required false (#632)
1 parent 21f5d7c commit 8351a7c

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@nordcloud/gnui",
33
"description": "Nordcloud Design System - a collection of reusable React components used in Nordcloud's SaaS products",
4-
"version": "8.13.2",
4+
"version": "8.13.3",
55
"license": "MIT",
66
"repository": {
77
"type": "git",

src/components/modal/Modal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ export function Modal({
5353
>
5454
{children}
5555
</ModalContent>
56-
{actions?.length > 0 && (
56+
{actions && (
5757
<ModalActions>
5858
{actions
59-
.sort((a, b) => a.order || 0 - b.order || 0)
59+
?.sort((a, b) => a.order || 0 - b.order || 0)
6060
.map((action, index) => (
6161
<ModalAction
6262
key={`modal-action-${index}`}

src/components/modal/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ type ModalAction = {
2222
export type ModalProps = {
2323
isOpen: boolean;
2424
onClose?: (event: React.KeyboardEvent | React.MouseEvent) => void;
25-
actions: ModalAction[];
25+
actions?: ModalAction[];
2626
contentLabel: string;
2727
children: React.ReactNode;
2828
};

0 commit comments

Comments
 (0)