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 はまだ評価されていません。