react-toolbox/components/font_icon
Brock Wills ae09770cd4 Importing PropTypes from prop-types rather than react (#1413) 2017-04-17 16:14:17 +02:00
..
FontIcon.d.ts Restructure typescript definitions (#1114) 2017-01-18 08:37:37 +01:00
FontIcon.js Importing PropTypes from prop-types rather than react (#1413) 2017-04-17 16:14:17 +02:00
index.d.ts Restructure typescript definitions (#1114) 2017-01-18 08:37:37 +01:00
index.js Update dependencies and linter (#1180) 2017-01-26 18:05:32 +01:00
readme.md Alternative text for the FontIcon 2017-01-11 19:51:02 +01:00

readme.md

Font Icon

The font icon component is used to represent an icon from the Google Material Design icon font. React Toolbox does not provide the font icon for you. You need to get the icons using whatever method you want. We recommend to import the font and the associated CSS from Google Fonts as is specified here.

import FontIcon from 'react-toolbox/lib/font_icon';

const FontIcons = () => (
  <span>
    <FontIcon value='add' />
    <FontIcon value='favorite' />
    <FontIcon value='account_circle' />
    <FontIcon>star</FontIcon>
  </span>
);

Properties

Name Type Default Description
alt String '' The text used to set the aria-label attribute.
className String '' The class name to give custom styles such as sizing.
value String or Element The key string for the icon you want be displayed.