Add default props to modal

This commit is contained in:
Igor 2019-11-15 15:20:26 -03:00
parent b6119f8e29
commit 7f6de72e8e

View File

@ -40,27 +40,20 @@ function createUIModalService() {
* @param {Modal} component React component
* @param {ModalProps} props { header, footer, backdrop, keyboard, show, closeButton, title, customClassName }
*/
function show(component, props) {
const {
header = null,
footer = null,
backdrop = false,
keyboard = false,
show = true,
closeButton = true,
title = null,
customClassName = null,
} = props;
return uiModalServiceImplementation._show(component, {
header,
footer,
backdrop,
keyboard,
show,
closeButton,
title,
customClassName,
});
function show(
component,
props = {
header: null,
footer: null,
backdrop: false,
keyboard: false,
show: true,
closeButton: true,
title: null,
customClassName: null,
}
) {
return uiModalServiceImplementation._show(component, props);
}
/**