Skip to content

Commit

Permalink
🩹 only show close button if we have a close action
Browse files Browse the repository at this point in the history
  • Loading branch information
timbryandev committed Dec 18, 2023
1 parent e20584a commit 2a9ae7a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/src/components/modal/ModalHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ export function ModalHeader({
</div>

{navigationItems}
<CloseButton onClick={onCloseClick} />
{typeof onCloseClick === "function" ? (
<CloseButton onClick={onCloseClick} />
) : null}
</div>
);
}
Expand Down

0 comments on commit 2a9ae7a

Please sign in to comment.