From 66f83b24bdf88169f7e470231f5eb14627156a9c Mon Sep 17 00:00:00 2001 From: Aleksandr Gumroian Date: Wed, 4 Dec 2024 14:02:35 +0100 Subject: [PATCH] Add optional close button to ModalHeader component --- src/bootstrap/Modal.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/bootstrap/Modal.js b/src/bootstrap/Modal.js index a1e65c0..efdf6a8 100644 --- a/src/bootstrap/Modal.js +++ b/src/bootstrap/Modal.js @@ -88,18 +88,21 @@ export function Modal({ shown, setShown, scrollable, size, children }) { ModalHeader.propTypes = { setShown: PropTypes.func.isRequired, title: PropTypes.string.isRequired, + showCloseButton: PropTypes.bool, }; -export function ModalHeader({ setShown, title }) { +export function ModalHeader({ setShown, title, showCloseButton = true }) { return (

{title}

-
); }