How to change style in MenuItem from PrimeNG

Viewed 13528

I'm trying to change the color of a MenuItem, using PrimeNG here. Here's my code so far:

<p-menu [style]="{'width': '400px'}" #menuOpcoesLista popup="popup" [model]="opcoesListaCS" appendTo="body"></p-menu>

And here's my function to create the itens from menu:

     this.opcoesListaCS = [
        {label: 'Approve', command: (event) => { this.approve() }},
        {label: 'Send email', command: (event) => { this.sendMail() }},
        {label: 'Details', command: (event) => { this.details() }}];

I tried to add style tag, according to PrimeNG docs, but it just doesn´t work. Tried all formats and kinds, tried also class. But non worked for me.

Does anyone know how to change the color? I'd like the first one to be green, second as yellow and third as red.

1 Answers
Related