Custom icons with multiple classes
- 主要语言
- 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 还没有评估数据。