Reputation: 4220
I have checked on my node module, FontIcon folder not present, its missing, I have tried many thinks but problem not resolved, Please help me. My package.json file:
{
"name": "flipshop",
"version": "0.1.0",
"private": true,
"dependencies": {
"axios": "^0.18.0",
"material-ui": "^1.0.0-beta.40",
"react": "^16.2.0",
"react-bootstrap": "^0.32.1",
"react-dom": "^16.2.0",
"react-router-dom": "^4.2.2",
"react-scripts": "1.1.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
},
"devDependencies": {
"file-loader": "^1.1.11"
}
}
Upvotes: 0
Views: 1637
Reputation: 281764
FontIcon is not an export in material-ui
version 1.0.0-beta.40
, you need to make use of Icons
To use FontIcons
, include
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
in your project and then
To use an icon
simply wrap the icon name (font ligature) with the Icon
component, for example:
import Icon from 'material-ui/Icon';
...
<Icon>star</Icon>
Check the documentation
Upvotes: 1