I want to use an icon inside an iconbutton like this:
<IconButton >
<SearchIcon/>
</IconButton>
I installed @material-ui/icons in my package.json and have the following imports:
import IconButton from '@material-ui/core/IconButton';
import Icon from '@material-ui/core/Icon';
import SearchIcon from '@material-ui/icons/SearchIcon';
Now I get the error message:
Module not found: Can't resolve '@material-ui/icons/SearchIcon'
Can somebody help me?
您不需要在名称后附加Icon
,只需使用名称 ie /Search
(参见示例)。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.