diff --git a/platform/core/src/services/UIModalService/index.js b/platform/core/src/services/UIModalService/index.js index b8901e013..1909804dd 100644 --- a/platform/core/src/services/UIModalService/index.js +++ b/platform/core/src/services/UIModalService/index.js @@ -1,7 +1,7 @@ /** * A UI Element * - * @typedef {HTMLElement} Modal + * @typedef {ReactElement|HTMLElement} Modal */ /** @@ -16,7 +16,7 @@ * @property {boolean} [customClassName=null] - '.ModalClass' */ -const uiModalServicePublicApi = { +const uiModalServicePublicAPI = { name: 'UIModalService', hide, show, @@ -28,14 +28,14 @@ const uiModalServiceImplementation = { _show: () => console.warn('show() NOT IMPLEMENTED'), }; -function createUiModalService() { - return uiModalServicePublicApi; +function createUIModalService() { + return uiModalServicePublicAPI; } /** * Show a new UI modal; * - * @param {Modal} component + * @param {Modal} component React component * @param {ModalProps} props { backdrop, keyboard, show, closeButton, title, customClassName } */ function show(component, props) { @@ -86,4 +86,4 @@ function setServiceImplementation({ } } -export default createUiModalService; +export default createUIModalService; diff --git a/platform/core/src/services/UINotificationService/index.js b/platform/core/src/services/UINotificationService/index.js index 86e6e1f56..7538a6280 100644 --- a/platform/core/src/services/UINotificationService/index.js +++ b/platform/core/src/services/UINotificationService/index.js @@ -10,7 +10,7 @@ * @property {boolean} [autoClose=true] */ -const uiNotificationServicePublicApi = { +const uiNotificationServicePublicAPI = { name: 'UINotificationService', hide, show, @@ -23,7 +23,7 @@ const uiNotificationServiceImplementation = { }; function createUINotificationService() { - return uiNotificationServicePublicApi; + return uiNotificationServicePublicAPI; } /** diff --git a/platform/ui/src/utils/ModalProvider.js b/platform/ui/src/utils/ModalProvider.js index cbf07c220..2f66692e9 100644 --- a/platform/ui/src/utils/ModalProvider.js +++ b/platform/ui/src/utils/ModalProvider.js @@ -80,11 +80,11 @@ const ModalProvider = ({ children, modal: Modal, service }) => { }; ModalProvider.propTypes = { - children: PropTypes.node, - modal: PropTypes.node, + children: PropTypes.node.isRequired, + modal: PropTypes.node.isRequired, service: PropTypes.shape({ setServiceImplementation: PropTypes.func, - }), + }).isRequired, }; /**