1.0.0-alpha.4 • Published 6 years ago

material-ui-apollo-icons v1.0.0-alpha.4

Weekly downloads
360
License
UNLICENSED
Repository
gitlab
Last release
6 years ago

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.