CR Update: fix casing and add required proptypes to providers
This commit is contained in:
parent
e684558783
commit
95c18b4986
@ -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;
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -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,
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user