0.3.3 • Published 6 years ago
svg-reacticons v0.3.3
svg-reacticons
This package provides SVG icons packaged as a group of React components.
Installation
Install the package in your project directory with:
npm install svg-reacticons
Usage
When importing an icon, keep in mind that the names of the icons are PascalCase
, for instance:
microwave
is exposed assvg-reacticons/icons/MicrowaveOutlined
truck
is exposed assvg-reacticons/icons/TruckOutlined
Imports
- If your environment doesn't support tree-shaking, the recommended way to import the icons is the following:
import MicrowaveIcon from '@material-ui/icons/MicrowaveOutlined';
import TruckIcon from '@material-ui/icons/TruckOutlined';
- If your environment support tree-shaking you can also import the icons this way:
import { AccessAlarm, ThreeDRotation } from '@material-ui/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. It may also impact Hot Module Reload performance.