[英]How do I change the weight and color of the border of the Material UI Dialog?
Hello I am trying to add an external frame to the Dialog Box from Material UI.您好,我正在尝试从 Material UI 向对话框添加外部框架。 I was trying to do this but nothing happened:
我试图这样做,但什么也没发生:
overrides: {
MuiDialog :{
paper : {
borderWidth : 10,
borderRadius: 10,
borderColor : "#FFFFFF",
backgroundColor : "#101010"
}
}, .......
Do you know a way to do by using overrides in the MUI theme?您知道在 MUI 主题中使用覆盖的方法吗?
Thanks谢谢
The main issue I see is that you aren't setting border-style
.我看到的主要问题是您没有设置
border-style
。 The following works:以下工作:
const theme = createMuiTheme({
overrides: {
MuiDialog: {
paper: {
borderWidth: 10,
borderRadius: 10,
borderColor: "#fff",
borderStyle: "solid",
backgroundColor: "#101010",
color: "#fff"
}
}
}
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.