简体   繁体   English

错误尝试导入错误:“NotificationsNoneIcon”未从“@material-ui/icons”导出

[英]error Attempted import error: 'NotificationsNoneIcon' is not exported from '@material-ui/icons'

i have a question , why i recieve this error while compiling : Attempted import error: 'NotificationsNoneIcon' is not exported from '@material-ui/icons'.我有一个问题,为什么我在编译时收到此错误:尝试导入错误:“NotificationsNoneIcon”未从“@material-ui/icons”导出。

because i installed material icon and there is my code : could you help me ?因为我安装了材质图标并且有我的代码:你能帮我吗?

import React from 'react';
import   './topbar.css'
import {NotificationsNoneIcon,Language,Settings} from '@material-ui/icons';
function Topbar() {
    return (
        <div className="topbar">
            <div className="topbarWrapper">
                <div className="topleft">
                    <span className="logo">lammadamin</span>
                </div>
                <div className="topright">
                    <div className="topbarIconContainer">
                        <NotificationsNoneIcon/>
                        <span className="topIconBadge">2</span>
                    </div>
                    <div className="topbarIconContainer">
                        <Language/>
                        <span className="topIconBadge">2</span>
                    </div>
                    <div className="topbarIconContainer">
                        <Settings/>
                        <span className="topIconBadge">2</span>
                    </div>
                </div>
            </div>
        </div>
    )
}

export default Topbar

Accords https://material-ui.com/components/material-icons/ ,符合https://material-ui.com/components/material-icons/

You should import without Icon word你应该在没有Icon字的情况下导入

import {NotificationsNone as NotificationsNoneIcon,Language,Settings} from '@material-ui/icons';

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 尝试导入错误:“ToogleButton”未从“@material-ui/lab”导出 - Attempted import error: 'ToogleButton' is not exported from '@material-ui/lab' 尝试导入错误:“useThemeVariants”未从“@material-ui/styles”导出 - Attempted import error: 'useThemeVariants' is not exported from '@material-ui/styles' 尝试导入错误:“ImageList”未从“@material-ui/core”导出 - Attempted import error: 'ImageList' is not exported from '@material-ui/core' 尝试导入错误:“useControlled”未从“@material-ui/core/utils”导出 - Attempted import error: 'useControlled' is not exported from '@material-ui/core/utils' 尝试导入错误:“fade”未从“@material-ui/core/styles”导出 - Attempted import error: 'fade' is not exported from '@material-ui/core/styles' 尝试导入错误:“alpha”未从“@material-ui/core/styles”导出 - Attempted import error: 'alpha' is not exported from '@material-ui/core/styles' 尝试导入错误:“unstable_useId”未从“@material-ui/core/utils”导出(导入为“useId”) - Attempted import error: 'unstable_useId' is not exported from '@material-ui/core/utils' (imported as 'useId') 尝试导入错误:“GlobalStyles”未从“@material-ui/system”导出(导入为“SystemGlobalStyles”) - Attempted import error: 'GlobalStyles' is not exported from '@material-ui/system' (imported as 'SystemGlobalStyles') 尝试导入错误:“makeStyles”未从“@material-ui/core/styles”导出 - Attempted import error: 'makeStyles' is not exported from '@material-ui/core/styles' 尝试导入错误:“FaPencil”未从“react-icons/fa”导出 - Attempted import error: 'FaPencil' is not exported from 'react-icons/fa'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM