import { Component, input, Input } from '@angular/core';
import { CommonModule } from '@angular/common';
import { MenusModule } from '@progress/kendo-angular-menu';
import { ICON_SETTINGS, SVGIcon } from '@progress/kendo-angular-icons';
@Component({
selector: 'mnp-menu-item',
standalone: true,
imports: [CommonModule, MenusModule],
providers: [{ provide: ICON_SETTINGS, useValue: { type: 'font', size: 'medium' } }],
template: `
<link
rel="stylesheet"
href="https://unpkg.com/@progress/kendo-font-icons/dist/index.css"
/>
<kendo-menu [items]="items"
>
<ng-template kendoMenuItemTemplate let-item="item" >
<span class='item'>
<span class="icon-container">
<ng-container *ngIf="item.icon; else noIcon">
<span [ngClass]="item.icon" class="k-icon"></span>
</ng-container>
<ng-template #noIcon>
<span class="k-icon empty-icon"></span>
</ng-template>
</span>
{{ item.text }}
</span>
</ng-template>
</kendo-menu>
`,
styleUrl: './menu-item.component.scss',
})
export class MenuItemComponent {
@Input() items: MenuItem[] = [];
@Input() vertical: boolean = false;
}
interface MenuItem {
text?: string;
url?: string;
icon?: string; // Dynamic icon field
disabled?: boolean;
separator?: boolean;
svgIcon?: SVGIcon;
cssClass?: string;
items?: MenuItem[];
}
In my project I have many tooltips for displaying different things. But I want to change the CSS properties of one tooltip in particular which will not affect the other tooltips. How to do it ,the method mentioned in the document doesn't seem to work.
<div kendoTooltip tooltipClass="my-class">
.my-class *{
color:black;
}
The calendar popup is not getting closed even after selecting the date or clicking outside.
This is how I have integrated data picker in my component.
</kendo-datepicker>
Hi,
I have a kendo-dropdownlist and I want to override the style of the kendo-popup. I want to change the font as well as change the style for the selected item (see attached file) like the background color, etc...
How do I go about doing this? I've tried styling using pseudo ::ng-deep, :host ::ng-deep to using the classes .k-popup, the li's .k-list-item, etc..
Thanks!
Jaime
Hi Team,
I attached my project with this question.
Can you look at the problem of anchor giving the error "Property 'nativeElement' is missing in type 'HTMLButtonElement' but required in type 'ElementRef<any>'"
StockBlitz also working fine. Only one doubt is Angular CLI version.
I'm using Angular CLI v12
Can you check the attached project and solve the issue!
<div class="example-config">
<button #anchor (click)="onToggle()" class="k-button">
{{ toggleText }} Popup
</button>
</div>
<kendo-popup [anchor]="anchor" (anchorViewportLeave)="show = false" *ngIf="show">
<div class="content">
<!-- User-defined content -->
Popup content.
</div>
</kendo-popup>
Regards,
Srinivas M.P.