-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(icons): create module for icons
- Loading branch information
Showing
5 changed files
with
33 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,15 @@ | ||
import { CommonModule } from '@angular/common'; | ||
import { NgModule } from '@angular/core'; | ||
import { RouterModule, Routes } from '@angular/router'; | ||
import { FontAwesomeModule, FaIconLibrary } from '@fortawesome/angular-fontawesome'; | ||
import { faTwitter } from '@fortawesome/free-brands-svg-icons'; | ||
import { faStar } from '@fortawesome/free-solid-svg-icons'; | ||
import { TuiButtonModule } from '@taiga-ui/core'; | ||
|
||
import { IconModule } from '../../shared/ui/icon/icon.module'; | ||
import { AboutComponent } from './about.component'; | ||
|
||
const routes: Routes = [{ path: '', component: AboutComponent }]; | ||
|
||
@NgModule({ | ||
imports: [ | ||
CommonModule, | ||
TuiButtonModule, | ||
FontAwesomeModule, | ||
RouterModule.forChild(routes), | ||
], | ||
imports: [CommonModule, TuiButtonModule, RouterModule.forChild(routes), IconModule], | ||
declarations: [AboutComponent], | ||
}) | ||
export class AboutModule { | ||
private icons = [faStar, faTwitter]; | ||
|
||
constructor(faIconLibrary: FaIconLibrary) { | ||
faIconLibrary.addIcons(...this.icons); | ||
} | ||
} | ||
export class AboutModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,13 @@ | ||
import { CommonModule } from '@angular/common'; | ||
import { NgModule } from '@angular/core'; | ||
import { FontAwesomeModule, FaIconLibrary } from '@fortawesome/angular-fontawesome'; | ||
import { | ||
faGithub, | ||
faMediumM, | ||
faTwitter, | ||
faLinkedinIn, | ||
} from '@fortawesome/free-brands-svg-icons'; | ||
import { TuiLinkModule } from '@taiga-ui/core'; | ||
|
||
import { IconModule } from '../icon/icon.module'; | ||
import { FooterComponent } from './footer.component'; | ||
|
||
@NgModule({ | ||
imports: [CommonModule, FontAwesomeModule, TuiLinkModule], | ||
imports: [CommonModule, TuiLinkModule, IconModule], | ||
declarations: [FooterComponent], | ||
exports: [FooterComponent], | ||
}) | ||
export class FooterModule { | ||
private icons = [faGithub, faMediumM, faTwitter, faLinkedinIn]; | ||
|
||
constructor(faIconLibrary: FaIconLibrary) { | ||
faIconLibrary.addIcons(...this.icons); | ||
} | ||
} | ||
export class FooterModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { FontAwesomeModule, FaIconLibrary } from '@fortawesome/angular-fontawesome'; | ||
import { | ||
faGithub, | ||
faMediumM, | ||
faTwitter, | ||
faLinkedinIn, | ||
} from '@fortawesome/free-brands-svg-icons'; | ||
import { faStar, faBook, faLink } from '@fortawesome/free-solid-svg-icons'; | ||
|
||
@NgModule({ | ||
imports: [FontAwesomeModule], | ||
exports: [FontAwesomeModule], | ||
}) | ||
export class IconModule { | ||
private icons = [faGithub, faMediumM, faTwitter, faLinkedinIn, faStar, faBook, faLink]; | ||
|
||
constructor(faIconLibrary: FaIconLibrary) { | ||
faIconLibrary.addIcons(...this.icons); | ||
} | ||
} |