如何全局禁用所有Material-ui React组件的盒子阴影? [英] How to disable box-shadows globally for all material-ui React components?
本文介绍了如何全局禁用所有Material-ui React组件的盒子阴影?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要为大多数material-ui组件禁用默认的箱形阴影.现在,我通过为每个组件手动设置样式来做到这一点,就像这样:
I need to disable the default box-shadows for most material-ui components. Right now I'm doing this by setting the style manually for each component, like this:
<FloatingActionButton style={{boxShadow: "none"}} />
是否有可能在全球范围内执行此操作,也许使用主题设置?
Is there a way to do this globally, maybe using a theme setting?
推荐答案
您可以按如下所示的组件进行操作:
You can do it by component like this:
<AppBar elevation={0} />
这篇关于如何全局禁用所有Material-ui React组件的盒子阴影?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文