admin管理员组文章数量:1318129
I need to know how to apply a 'transparent' style porperty background to my SwipeableDrawer ponent from Material UI... Since the ponent creates another ponent in my html file when it renders i cannot change his background from my code. I tried to put some , but it seems that the ponent doesn`t like it.
Thanks in advance.
I need to know how to apply a 'transparent' style porperty background to my SwipeableDrawer ponent from Material UI... Since the ponent creates another ponent in my html file when it renders i cannot change his background from my code. I tried to put some , but it seems that the ponent doesn`t like it.
Thanks in advance.
Share Improve this question asked Jul 28, 2018 at 0:53 MichalisticoMichalistico 1853 silver badges14 bronze badges1 Answer
Reset to default 9As stated in Material-ui Docs you can override the style of Modal
using ModalProps
.
Using the BackdropProps
of Modal
you can able to set the background to transparent.
Create a styles
variable and apply the necessary styles.
const styles = {
BackdropProps: {
background: 'transparent'
}
};
Apply the style to the root of Backdrop
using classes
property
<SwipeableDrawer ModalProps={{
BackdropProps:{
classes:{
root:classes.BackdropProps
}
}
}}
{...otherProps}>
Have a look at overriding ponents with classes in the docs
本文标签: javascriptTransparent Swipeable drawer MaterialUIStack Overflow
版权声明:本文标题:javascript - Transparent Swipeable drawer Material-UI - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741993317a2409542.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论