我正在尝试使用Button with icon。
<Button icon="add" floating accent mini />
我尝试在不同的组件中使用图标。一切都没有成功。
<FontIcon value='add' />
上面的代码也呈现为文本。
答案 0 :(得分:0)
import {Button, IconButton} from 'react-toolbox/lib/button';
<IconButton icon="add" floating accent mini />
以下是完整的参考资料:http://react-toolbox.com/#/components/button
答案 1 :(得分:0)
React Toolbox假定您要导入Roboto字体和材质设计图标。
为了为你导入字体,我们需要将它们包含在CSS中,这被认为是一种不好的做法。如果您未在应用中添加它们,请转到链接的网站并按照说明操作。
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons|Roboto:400,500,700" />