Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
MurhafSousli committed Jun 7, 2024
1 parent 30c3537 commit e3b0bb1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
5 changes: 2 additions & 3 deletions projects/ngx-sharebuttons/icons/src/share-icons.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { InjectionToken, Provider } from '@angular/core';
import { Provider } from '@angular/core';
import { FaIconLibrary } from '@fortawesome/angular-fontawesome';
import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
import { SHARE_ICONS } from 'ngx-sharebuttons';
import {
faFacebookF, faFacebookMessenger, faLine, faLinkedinIn, faMix, faPinterestP,
faRedditAlien, faTelegramPlane, faTumblr, faXTwitter, faViber, faVk, faWhatsapp, faXing
Expand All @@ -16,8 +17,6 @@ const icons: IconDefinition[] = [
faEnvelope, faCheck, faPrint, faExclamation, faLink, faEllipsisH, faMinus, faLine
];

export const SHARE_ICONS: InjectionToken<unknown> = new InjectionToken('SHARE_ICONS');

export function iconsLoaderFactory(iconLibrary: FaIconLibrary) {
iconLibrary.addIcons(...icons);
return null;
Expand Down
3 changes: 2 additions & 1 deletion projects/ngx-sharebuttons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"@angular/cdk": ">=17.0.0"
},
"dependencies": {
"tslib": "^2.3.0"
"tslib": "^2.3.0",
"@fortawesome/fontawesome-svg-core": ">=6.5.0"
},
"sideEffects": false
}
6 changes: 4 additions & 2 deletions projects/ngx-sharebuttons/src/lib/share.models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ import { ShareButtonProp } from './share.defaults';

export const SHARE_BUTTONS_CONFIG: InjectionToken<ShareButtonsConfig> = new InjectionToken<ShareButtonsConfig>('shareButtonsConfig');

export function provideShareButtonsOptions(...providers: Provider[]): Provider[] {
return [providers];
export const SHARE_ICONS: InjectionToken<unknown> = new InjectionToken('SHARE_ICONS');

export function provideShareButtonsOptions(...providers: Provider[]): Provider {
return providers;
}

export function withConfig(options: ShareButtonsConfig): Provider {
Expand Down
3 changes: 1 addition & 2 deletions projects/ngx-sharebuttons/src/lib/share.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ import { HttpParams } from '@angular/common/http';
import { Meta } from '@angular/platform-browser';
import { Platform } from '@angular/cdk/platform';
import { Clipboard } from '@angular/cdk/clipboard';
import { SHARE_ICONS } from 'ngx-sharebuttons/icons';
import { getValidUrl } from './utils';
import { SHARE_BUTTONS } from './share.defaults';
import { IShareButton, ShareParams, ShareParamsFunc, SharerMethod, SharerMethods } from './share.models';
import { SHARE_ICONS, IShareButton, ShareParams, ShareParamsFunc, SharerMethod, SharerMethods } from './share.models';

interface ShareLinkParams {
url: string;
Expand Down

0 comments on commit e3b0bb1

Please sign in to comment.