0

Here is the button,

enter image description here

and here is the button I clicked.

enter image description here

I can't say the button is not working, but compare to the example, it is so wire:

http://react-toolbox.com/#/components/button

The source code:

import {Button} from 'react-toolbox/lib/button';

...

<Button icon='add' label='Add this' flat primary />

The loader in 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
        ]
      },

Please advise.

DNB5brims
  • 29,344
  • 50
  • 131
  • 195

2 Answers2

0

Include the material icons in index.html

<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
Venugopal
  • 1,888
  • 1
  • 17
  • 30
0

You can simply install the following module.

https://www.npmjs.com/package/react-google-material-icons

Install

npm install react-google-material-icons

Use it

import MaterialIcon from 'react-google-material-icons'

<MaterialIcon icon="account_box" size={36}/>
Madura Pradeep
  • 2,378
  • 1
  • 30
  • 34