From ba772be869d11676875e1357ceaeda07f5b10533 Mon Sep 17 00:00:00 2001 From: Bogdan Bodnar Date: Wed, 26 Feb 2020 11:44:52 +0100 Subject: [PATCH 1/3] Add option to make modal scrollable. --- src/bootstrap/Modal.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/bootstrap/Modal.js b/src/bootstrap/Modal.js index 42e24f1..d7d69e6 100644 --- a/src/bootstrap/Modal.js +++ b/src/bootstrap/Modal.js @@ -17,6 +17,7 @@ Modal.propTypes = { shown: PropTypes.bool.isRequired, /** Callback to manage modal visibility */ setShown: PropTypes.func.isRequired, + scrollable: PropTypes.bool, /** Modal content use following: `ModalHeader`, `ModalBody`, `ModalFooter` */ children: PropTypes.oneOfType([ @@ -25,7 +26,9 @@ Modal.propTypes = { ]).isRequired, }; -export function Modal({ shown, setShown, children }) { +export function Modal({ + shown, setShown, scrollable, children, +}) { const dialogRef = useRef(); useClickOutside(dialogRef, () => setShown(false)); @@ -33,7 +36,11 @@ export function Modal({ shown, setShown, children }) { return (
-
+
{children}
From bf8c2d28bfa3d902a466d0deb38ca8934b3bab54 Mon Sep 17 00:00:00 2001 From: Bogdan Bodnar Date: Wed, 26 Feb 2020 15:21:43 +0100 Subject: [PATCH 2/3] Allow RadioSet accept elements as children. --- src/bootstrap/RadioSet.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/bootstrap/RadioSet.js b/src/bootstrap/RadioSet.js index f0e9b5f..72bbda2 100644 --- a/src/bootstrap/RadioSet.js +++ b/src/bootstrap/RadioSet.js @@ -17,7 +17,12 @@ RadioSet.propTypes = { /** Choices . */ choices: PropTypes.arrayOf(PropTypes.shape({ /** Choice lable . */ - label: PropTypes.string.isRequired, + label: PropTypes.oneOfType([ + PropTypes.string, + PropTypes.element, + PropTypes.node, + PropTypes.arrayOf(PropTypes.node), + ]).isRequired, /** Choice value . */ value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired, })).isRequired, @@ -58,7 +63,12 @@ export function RadioSet({ } Radio.propTypes = { - label: PropTypes.string.isRequired, + label: PropTypes.oneOfType([ + PropTypes.string, + PropTypes.element, + PropTypes.node, + PropTypes.arrayOf(PropTypes.node), + ]).isRequired, id: PropTypes.string.isRequired, helpText: PropTypes.string, }; From aa639596d45dd0d72e2905fcdbde5c4b2ea9e547 Mon Sep 17 00:00:00 2001 From: Bogdan Bodnar Date: Wed, 26 Feb 2020 16:52:53 +0100 Subject: [PATCH 3/3] Bump v4.3.0. --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0dd544f..64d59fb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "foris", - "version": "4.2.0", + "version": "4.3.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 68389d6..4e49b27 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "foris", - "version": "4.2.0", + "version": "4.3.0", "description": "Set of components and utils for Foris and its plugins.", "author": "CZ.NIC, z.s.p.o.", "repository": {