1

enter image description here

I am trying to use Button with icon.

<Button icon="add" floating accent mini />

I tried to use icons in different components. nothing worked out.

<FontIcon value='add' />

Above code is also rendered as text.

dhanushkac
  • 520
  • 2
  • 8
  • 25

2 Answers2

1

React Toolbox assumes that you are importing Roboto Font and Material Design Icons.

In order to import the fonts for you, we'd need to include them in the CSS which is considered a bad practice. If you are not including them in your app, go to the linked sites and follow the instructions.

<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons|Roboto:400,500,700" />

dhanushkac
  • 520
  • 2
  • 8
  • 25
0
import {Button, IconButton} from 'react-toolbox/lib/button';

<IconButton icon="add" floating accent mini />

Here is a complete reference: http://react-toolbox.com/#/components/button

  • I have added related imports. if this issue with the import button will not be rendered. – dhanushkac Aug 18 '17 at 10:38
  • I'm not sure what you mean. If you tell me what the error is with the above change, I could probably help you out. –  Aug 18 '17 at 10:42