From e34b30d8dc792a94464f31235a73ead25a6b3f9c Mon Sep 17 00:00:00 2001 From: Patrick Sun Date: Thu, 5 Nov 2020 03:38:09 +1100 Subject: [PATCH] add new icons to menu item using font awesome --- src/app/app.component.html | 2 -- src/app/app.component.ts | 6 +++--- src/app/main-menu-items.ts | 13 ++++++------- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/app/app.component.html b/src/app/app.component.html index 172f9c6..9318674 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -8,8 +8,6 @@ -   text -   text diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 5615c2b..da15429 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,5 +1,5 @@ import { Component } from '@angular/core'; -import { faCoffee } from '@fortawesome/free-solid-svg-icons'; + import { mainMenuItems } from './main-menu-items'; @Component({ @@ -8,12 +8,12 @@ import { mainMenuItems } from './main-menu-items'; styleUrls: ['./app.component.scss'] }) export class AppComponent { - faCoffee = faCoffee + title = 'broker'; public items: any[] = mainMenuItems; public hasFa (item: any) : boolean { - console.log(item); + //console.log(item); return item.hasOwnProperty('fa'); } } diff --git a/src/app/main-menu-items.ts b/src/app/main-menu-items.ts index 7ef19d4..19cee46 100644 --- a/src/app/main-menu-items.ts +++ b/src/app/main-menu-items.ts @@ -1,16 +1,15 @@ -import { faCoffee } from '@fortawesome/free-solid-svg-icons'; +import { faChartArea, faChartPie, faIdCard, faIdCardAlt, faMoneyCheck, faUniversity, faUserCircle } from '@fortawesome/free-solid-svg-icons'; export const mainMenuItems: any[] = [ { text: '', - icon: 'menu' + fa: faUniversity }, { text: 'SFM', icon: 'more-vertical', - fa: faCoffee, items: [ - { text: 'Summary', icon: 'calculator', url: './#dashboard'}, + { text: 'Summary', fa: faChartArea, url: './#dashboard'}, { text: '--', separator: "true" }, { text: 'Logout', icon: 'logout', url: './#login'}] }, @@ -40,7 +39,7 @@ export const mainMenuItems: any[] = [ icon: 'user', items: [ { text: 'Add ', icon: 'plus', url: 'https://google.com.au' }, - { text: 'List All', icon: 'table' }, + { text: 'List All', fa: faIdCard }, { text: '--', separator: "true" }, { text: 'Search' ,icon: 'search'}, { text: '--', separator: "true" }, @@ -50,10 +49,10 @@ export const mainMenuItems: any[] = [ { text: 'Brokers', - icon: 'user', + fa: faUserCircle, items: [ { text: 'Add ', icon: 'plus', url: 'https://google.com.au' }, - { text: 'List All', icon : 'table' }, + { text: 'List All', fa: faIdCardAlt}, { text: '--', separator: "true" }, { text: 'Search' , icon: 'search'}, { text: '--', separator: "true" },