英文:
How to change background colour of the mini variant drawer?
问题
我已经尝试过使用他们的方法之一来更改颜色,例如
V1
<Drawer style={{backgroundColour: black}} variant="permanent" open={open} >
V2
<Drawer variant="permanent" open={open}
backgroundColor="black">
但抽屉的颜色就是不会改变,什么都不会发生,我查看了文档,但文档并没有明确告诉我该怎么做。我对React还相当陌生。
试图将此抽屉更改为黑色。
英文:
I have tried changing the colour using one of their methods such as
V1
<Drawer style={{backgroundColour: black}} variant="permanent" open={open} >
V2
<Drawer variant="permanent" open={open}
backgroundColor="black">
But it just won't change in the drawer, nothing happens, I've looked at documentation and it doesn't clearly tell me what to do for it. I'm quite new to react.
Was trying to change this drawer to black
答案1
得分: 0
哈哈,试试使用PaperProps
,希望能解决这个问题:
<Drawer variant="permanent" open={open}
PaperProps={{
style: {
backgroundColor: "black",
},
}}
>
英文:
Aha, just try to use PaperProps
, hope is would solve the issue:
<Drawer variant="permanent" open={open}
PaperProps={{
style: {
backgroundColor: "black",
},
}}
>
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论