akveo / akveo/nebular

Custom icons with multiple classes

未关闭
#2,474 0 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
8.1k
派生
1.5k
PR 合并指标
30 天内没有已合并 PR

描述

### Issue type

**I'm submitting a ...** (check one with "x")

* [X] bug report
* [ ] feature request

### Issue description

**Current behavior:**
Font-awesome requires many icons to be specified with multiple classes, e.g `fal fa-sign-out-alt`. It doesn't appear to be possible to specify multiple classes in `nb-icon`, nor in the `icon` property of `nbMenuItem` - it results in the following error:

`Failed to execute 'add' on 'DOMTokenList': The token provided ('fal fa-sign-out-alt') contains HTML space characters, which are not valid in tokens`

It **is** possible to specify `packClass` in `registerFontPack`, however, there doesn't seem to be a way to specify an icon pack other than the default with `nbMenuItem`.

**Expected behavior:**
There should be a facility to use additional icon classes with `nbMenuItem`

**Suggestion:**

this.iconLibraries.registerFontPack('font-awesome-fal', { iconClassPrefix: 'fa', additionalClasses: ['fal'] });

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。