forked from CITKParus/P8-Panels
WEB APP: P8PFullScreenDialog - возможность передачи свойств контейнеру содержимого диалога (contentProps)
This commit is contained in:
parent
6fa9d97da4
commit
a8a76766f4
@ -27,7 +27,7 @@ const STYLES = {
|
|||||||
//-----------
|
//-----------
|
||||||
|
|
||||||
//Полноэкранный диалог
|
//Полноэкранный диалог
|
||||||
const P8PFullScreenDialog = ({ title, onClose, children }) => {
|
const P8PFullScreenDialog = ({ title, onClose, contentProps, children }) => {
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
onClose ? onClose() : null;
|
onClose ? onClose() : null;
|
||||||
};
|
};
|
||||||
@ -46,7 +46,7 @@ const P8PFullScreenDialog = ({ title, onClose, children }) => {
|
|||||||
</Toolbar>
|
</Toolbar>
|
||||||
</AppBar>
|
</AppBar>
|
||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
<DialogContent>{children}</DialogContent>
|
<DialogContent {...(contentProps ? contentProps : {})}>{children}</DialogContent>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@ -55,7 +55,8 @@ const P8PFullScreenDialog = ({ title, onClose, children }) => {
|
|||||||
P8PFullScreenDialog.propTypes = {
|
P8PFullScreenDialog.propTypes = {
|
||||||
title: PropTypes.string.isRequired,
|
title: PropTypes.string.isRequired,
|
||||||
onClose: PropTypes.func,
|
onClose: PropTypes.func,
|
||||||
children: PropTypes.element
|
children: PropTypes.element,
|
||||||
|
contentProps: PropTypes.object
|
||||||
};
|
};
|
||||||
|
|
||||||
//----------------
|
//----------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user