내가 사용하고 대화에서 재료 ui react js 고 늘려야의 폭니다. 내가 알고 있는 것은 소품 불 maxWidth
잘 사용하고 있습니다. 그가 너비까지 900px(면 maxWidth="lg"
). 가 있다고 알고 있습니다 fullScreen
소품에서는 대화는 전체 화면입니다. 내가 무엇을 원하지 않습을 전체 화면이지만 내가 원하는 더 폭 보다 900px. 누군가의 도움을 받을 수 있는가?
1
이 그것을 밖으로 생각...
당신을 가져와야 makeStyles
서 material-ui/core
과 재정의 일부 자료는 스타일입니다.
이것은 대화 공용 구성품 코드입니다.
import React from 'react';
//Material UI Components
import {
Dialog,
DialogContent
} from '@material-ui/core';
//Material UI Styling
import {
makeStyles
} from '@material-ui/core/styles';
const useStyles = makeStyles({
root: {
".MuiDialogContent-root": {
padding: "0px 24px 8px 24px !important"
},
"& .MuiDialog-paperWidthLg": {
maxWidth: "none !important"
},
"& .MuiDialog-paper": {
margin: 0
},
"& .MuiDialogTitle-root": {
padding: "4px !important"
}
},
content: {
"&:first-child": {
paddingTop: "12px"
}
}
});
export default function PopUp(props) {
const {
children,
openPopup,
setOpenPopup,
} = props;
const classes = useStyles();
const handleClose = () => {
setOpenPopup(false);
};
return (
<
Dialog className = {
classes.root
}
onClose = {
handleClose
}
open = {
openPopup
}
maxWidth = "lg" >
<
DialogContent className = {
classes.content
} > {
children
} <
/DialogContent>
<
/Dialog>
)
}