material-ui-apollo-icons

Apollo Svg Icons converted to Material-UI React components.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
material-ui-apollo-icons
1.0.0-alpha.44 years ago5 years agoMinified + gzip package size for material-ui-apollo-icons in KB

Readme

material-ui-apollo-icons
This package provides the Quintiles IMS Apollo Icons packaged as a set of React components.

Installation

Install the package in your project directory with:
yarn add material-ui-apollo-icons

These components use the Material-UI SvgIcon component to render the SVG path for each icon, and so a have a peer-dependency on the next release of Material-UI.
If you are not already using Material-UI in your project, you can add it with:
yarn add @material-ui/core

Usage

The import path for each Material icon component includes the icon name in PascalCase.
For example to use the 'account' icon component, import material-ui-apollo-icons/Account.

Examples

  • If your environment doesn't support tree-shaking, the recommended way to import the icons is the following:
import AccountIcon from 'material-ui-apollo-icons/Account';
import AirplaneIcon from 'material-ui-apollo-icons/Airplane';

  • If your environment support tree-shaking you can also import the icons that way:
import { Account, Airplane } from 'material-ui-apollo-icons';

Note: Importing named exports in this way will result in the code for every icon being included in your project, so is not recommended unless you configure tree-shaking.