Solve Warning: The elevation provided <Paper elevation={24}> is not available in the theme.
2021/10/14 23:16:16
本文主要是介绍Solve Warning: The elevation provided <Paper elevation={24}> is not available in the theme.,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
If you got the following warning:
The elevation provided <Paper elevation={24}> is not available in the theme. Please make sure that `theme.shadows[24]` is defined
In order to mitigate this, you can change your shadows to a dictionary instead of array, for example:
const theme = createMuiTheme({ shadows: { 24: '0px 11px 15px -7px red,0px 24px 38px 3px red,0px 9px 46px 8px red', }, });
Or you can initialize shadows[24] with current existing item, for example:
const theme = createMuiTheme({ shadows: [ '0px 11px 15px -7px red,0px 24px 38px 3px red,0px 9px 46px 8px red', ], }); theme.shadows[24] = theme.shadows[0];
Refereces:
https://github.com/mui-org/material-ui/issues/8289
这篇关于Solve Warning: The elevation provided <Paper elevation={24}> is not available in the theme.的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-15Tailwind开发入门教程:从零开始搭建第一个项目
- 2024-11-14Emotion教程:新手入门必备指南
- 2024-11-14音频生成的秘密武器:扩散模型在音乐创作中的应用
- 2024-11-14从数据科学家到AI开发者:2023年构建生成式AI网站应用的经验谈
- 2024-11-14基于AI的智能调试助手创业点子:用代码样例打造你的调试神器!
- 2024-11-14受控组件学习:从入门到初步掌握
- 2024-11-14Emotion学习入门指南
- 2024-11-14Emotion学习入门指南
- 2024-11-14获取参数学习:初学者指南
- 2024-11-14受控组件学习:从入门到实践