Przeglądaj źródła

menu item color by default goes black

tags/2.037
Patrick Sun 5 lat temu
rodzic
commit
a946cab18b
3 zmienionych plików z 17 dodań i 7 usunięć
  1. +5
    -4
      src/app/app.component.html
  2. +9
    -1
      src/app/app.component.scss
  3. +3
    -2
      src/app/app.component.ts

+ 5
- 4
src/app/app.component.html Wyświetl plik

@@ -1,9 +1,10 @@
<kendo-appbar *ngIf='login' class='appbar' [position]="'top'" [positionMode]="'sticky'">
<kendo-appbar id='topBar' *ngIf='login' class='appbar' [position]="'top'" [positionMode]="'sticky'">
<kendo-appbar-section>
<kendo-menu [items]="items" (select)="onSelect($event)">
<ng-template kendoMenuItemTemplate let-item="item">
<fa-icon *ngIf="menuItemHasFontawesome(item)" [icon]="item.fa"></fa-icon> &nbsp;
{{ item.text }}
<ng-template kendoMenuItemTemplate let-item="item" >
<span class='main-menu-item'>
<fa-icon *ngIf="menuItemHasFontawesome(item)" [icon]="item.fa"></fa-icon> &nbsp;
{{ item.text }} </span>
</ng-template>
</kendo-menu>
</kendo-appbar-section>

+ 9
- 1
src/app/app.component.scss Wyświetl plik

@@ -22,4 +22,12 @@
.appbar,
.k-appbar-sticky{
z-index: 1000;
}
}

#topBar .main-menu-item , #topBar .k-icon {
color:black !important;
}

.k-menu:not(.k-context-menu) > .k-item > .k-state-active {
background-color: lightblue;
}

+ 3
- 2
src/app/app.component.ts Wyświetl plik

@@ -1,4 +1,4 @@
import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core';
import { Component, OnDestroy, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
import { Subscription } from 'rxjs';
import { LoanEditComponent } from './loan-edit/loan-edit.component';

@@ -9,7 +9,8 @@ import { MenuService } from './service/menu.service';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
styleUrls: ['./app.component.scss'],
encapsulation: ViewEncapsulation.None
})
export class AppComponent implements OnInit , OnDestroy {
title = 'SFM broker';

Ładowanie…
Anuluj
Zapisz