3.6.0 • Published 3 months ago

@brightlayer-ui/icons-mui v3.6.0

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
3 months ago

npm.io npm

Brightlayer UI Icons for MUI

This library contains componentized svg icons from @brightlayer-ui/icons for use in React applications using MUI. The icons are made available in the same way that MUI exposes the Material Icons.

Installation

To install the Brightlayer UI mui icons from NPM as a dependency for your project, you can run one of the following commands in your project root:

npm install --save @brightlayer-ui/icons-mui
or
yarn add @brightlayer-ui/icons-mui

NOTE (Peer Dependencies): Using this package requires you to have @mui/material and @mui/icons-material defined as dependencies in your project's package.json file.

Usage

Angular

This package is intended for use only in React applications. For a way to link svg icons for use in Angular applications, see @brightlayer-ui/icons.

React

Once you have installed the npm module, you can import the icon components into your application as follows:

import myIcon from '@brightlayer-ui/icons-mui/MyIcon';
...
<myIcon></myIcon>

If you are importing multiple icons, you can save some space by using named imports from the package root:

import {FirstIcon, SecondIcon, ThirdIcon} from '@brightlayer-ui/icons-mui';

Applying Different Colors

To change the color of the icon you are using, simply set the CSS color property. This property is inheritable, so if the property is not set on your icon, it will be inherited from the parent container.

<FirstIcon style={{color: 'red'}}></FirstIcon>

Available Icons

See the Iconography on brightlayer-ui.github.io for a list of currently available icons.

NOTE: When using this package, icon names are in TitleCase (e.g., bypass_battery --> BypassBattery).

Building Icon Set (for contributors)

To build the icons-mui package (e.g., after new icons are added to Brightlayer UI):

git clone https://github.com/etn-ccis/blui-icons
cd packages/mui
yarn build

This will populate the /dist folder with all of the icon components as well as copy over necessary files for publishing (Readme, package.json, etc.).

When building the icons-mui package, it imports the latest icons from the @brightlayer-ui/icons-svg package, so when new icons are added, @brightlayer-ui/icons-svg must be published to NPM before this package can be updated.

Publishing

To publish the package:

yarn build
cd dist
npm version < patch | minor | major >
npm publish

NOTE: This package must be published from the /dist folder, not the root directory.

Browser Support

Brightlayer UI Icons for MUI will work with any modern browser. For details refer to our Browser Support documentation.

3.6.0

3 months ago

3.5.0

11 months ago

3.4.0

1 year ago

3.3.0

1 year ago

4.0.0-alpha.0

1 year ago

3.2.0

2 years ago

3.1.0

2 years ago

3.0.0

2 years ago

2.8.1

2 years ago

2.8.0

2 years ago

3.0.0-beta.0

2 years ago

2.7.0

3 years ago

2.7.0-beta.0

3 years ago