这是按钮,
这是我点击的按钮。
我不能说按钮不起作用,但与示例相比,它是如此连线:
http://react-toolbox.com/#/components/button
源代码:
import {Button} from 'react-toolbox/lib/button';
...
<Button icon='add' label='Add this' flat primary />
webpack.config.js中的加载程序:
{
test: /react-toolbox\/.*.css/,
use: [
"style-loader",
{
loader: "css-loader",
options: {
modules: true,
sourceMap: true,
importLoaders: 1,
localIdentName: "[name]--[local]--[hash:base64:8]"
}
},
"postcss-loader" // has separate config, see postcss.config.js nearby
]
},
请指教。
答案 0 :(得分:0)
在index.html
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
答案 1 :(得分:0)
您只需安装以下模块即可。
https://www.npmjs.com/package/react-google-material-icons
安装
npm install react-google-material-icons
使用它
import MaterialIcon from 'react-google-material-icons'
<MaterialIcon icon="account_box" size={36}/>