Skip to content

Commit

Permalink
Fix Modal Props actions to required false (#632)
Browse files Browse the repository at this point in the history
  • Loading branch information
raczyk authored Aug 2, 2023
1 parent 21f5d7c commit 8351a7c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@nordcloud/gnui",
"description": "Nordcloud Design System - a collection of reusable React components used in Nordcloud's SaaS products",
"version": "8.13.2",
"version": "8.13.3",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions src/components/modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ export function Modal({
>
{children}
</ModalContent>
{actions?.length > 0 && (
{actions && (
<ModalActions>
{actions
.sort((a, b) => a.order || 0 - b.order || 0)
?.sort((a, b) => a.order || 0 - b.order || 0)
.map((action, index) => (
<ModalAction
key={`modal-action-${index}`}
Expand Down
2 changes: 1 addition & 1 deletion src/components/modal/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type ModalAction = {
export type ModalProps = {
isOpen: boolean;
onClose?: (event: React.KeyboardEvent | React.MouseEvent) => void;
actions: ModalAction[];
actions?: ModalAction[];
contentLabel: string;
children: React.ReactNode;
};

0 comments on commit 8351a7c

Please sign in to comment.