akveo / nebular

:boom: Customizable Angular UI Library based on Eva Design System :new_moon_with_face::sparkles:Dark Mode
https://akveo.github.io/nebular
MIT License
8.06k stars 1.51k forks source link

Icons Pack: Register a svg #2089

Open beig opened 4 years ago

beig commented 4 years ago

Issue type

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

Issue description

Current behavior: Registering 3rd Party Icons with

 constructor(private iconLibraries: NbIconLibraries) {
    this.iconsLibrary.registerSvgPack('social-networks', {
          'facebook': '<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24"> ... </svg>',
          'twitter': '<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24"> ... </svg>',
          // ...
    });

Expected behavior: Registering 3rd Party Icons from file.svg

 constructor(private iconLibraries: NbIconLibraries) {
    this.iconsLibrary.registerSvgPack('social-networks', {
          'facebook': './assets/facebook.svg',
          'twitter': './assets/twitter.svg',
          // ...
    });
ykamchi commented 4 years ago

Hi beig,

Did you find any solution for this?

Thx, Yohay