fix(icons): remove icons with multiple classes

Renderer.addClass method throws if parameter contains space
This commit is contained in:
Sergey Andrievskiy 2019-06-20 10:54:16 +03:00
parent f4acf38848
commit 4b249288f2
2 changed files with 8 additions and 4 deletions

View file

@ -29,6 +29,7 @@
</nb-card-header> </nb-card-header>
<nb-card-body> <nb-card-body>
<nb-icon *ngFor="let icon of icons.fontAwesome" [icon]="icon" pack="fa"></nb-icon> <nb-icon *ngFor="let icon of icons.fontAwesome" [icon]="icon" pack="fa"></nb-icon>
<nb-icon *ngFor="let icon of icons.fontAwesomeRegular" [icon]="icon" pack="far"></nb-icon>
</nb-card-body> </nb-card-body>
<nb-card-footer> <nb-card-footer>
<a href="http://fortawesome.github.io/Font-Awesome/icons/" target="_blank"> <a href="http://fortawesome.github.io/Font-Awesome/icons/" target="_blank">

View file

@ -16,6 +16,7 @@ export class IconsComponent {
.filter(icon => icon.indexOf('outline') === -1); .filter(icon => icon.indexOf('outline') === -1);
iconsLibrary.registerFontPack('fa', { packClass: 'fa', iconClassPrefix: 'fa' }); iconsLibrary.registerFontPack('fa', { packClass: 'fa', iconClassPrefix: 'fa' });
iconsLibrary.registerFontPack('far', { packClass: 'far', iconClassPrefix: 'fa' });
iconsLibrary.registerFontPack('nebular', { iconClassPrefix: 'nb' }); iconsLibrary.registerFontPack('nebular', { iconClassPrefix: 'nb' });
iconsLibrary.registerFontPack('ion', { iconClassPrefix: 'ion' }); iconsLibrary.registerFontPack('ion', { iconClassPrefix: 'ion' });
} }
@ -61,11 +62,13 @@ export class IconsComponent {
fontAwesome: [ fontAwesome: [
'adjust', 'anchor', 'archive', 'chart-area', 'arrows-alt', 'arrows-alt-h', 'adjust', 'anchor', 'archive', 'chart-area', 'arrows-alt', 'arrows-alt-h',
'arrows-alt-v', 'asterisk', 'at', 'car', 'ban', 'university', 'arrows-alt-v', 'asterisk', 'at', 'car', 'ban', 'university',
'chart-bar', 'far fa-chart-bar', 'barcode', 'bars', 'bed', 'beer', 'chart-bar', 'barcode', 'bars', 'bed', 'beer',
'bell', 'far fa-bell', 'bell-slash', 'far fa-bell-slash', 'bicycle', 'binoculars', 'bell', 'bell-slash', 'bicycle', 'binoculars',
'birthday-cake', 'bolt', 'bomb', 'book', 'bookmark', 'far fa-bookmark', 'birthday-cake', 'bolt', 'bomb', 'book', 'bookmark',
'briefcase', 'bug', 'building', 'far fa-building', 'bullhorn', 'briefcase', 'bug', 'building', 'bullhorn',
], ],
fontAwesomeRegular: [ 'chart-bar', 'bell', 'bell-slash', 'bookmark', 'building' ],
}; };
} }