How to change the CSS of primeNG components in Angular?

Asked

Viewed 1,261 times

0

menu.component.html

<p-menubar class="menuPerson" [model]="items"></p-menubar>

menu.component.css

.menuPerson{
    background-color: olivedrab;
    font-size: 14px;
}

menu.componentts.

import { Component, OnInit } from '@angular/core';
import { MenuItem } from 'primeng/components/common/menuitem';

@Component({
  selector: 'menu',
  templateUrl: './menu.component.html',
  styleUrls: ['./menu.component.css']
})
export class MenuComponent implements OnInit {

  items: MenuItem[];

  constructor() { }

  ngOnInit() {
    this.items = [
      {
        label: 'Home',
        icon: 'pi pi-fw pi-home',
        routerLink: 'home'
      },

      {
        label: 'Usuario',
        icon: 'pi pi-fw pi-user',
        routerLink: 'usuario'
      },

      {
        label: 'Estados',
        routerLink: 'estados'
      }
    ];
  }

}

Menu a ser alterado

1 answer

0

Browser other questions tagged

You are not signed in. Login or sign up in order to post.