problem with [icon] in the kendo-toolbar-button

1 Answer 287 Views
Button
behnam
Top achievements
Rank 1
behnam asked on 05 Jul 2023, 01:44 PM

Hi guys,
I have used "kendo-toolbar-button" for my toolbar button but recently I got a warning in the console to replace [icon] with [svgIcon].  As I have many pages to modify, I would appreciate it if anybody let me know if there is another method to prevent this modification.

Thanks
Behnam

 <kendo-toolbar-button
                [icon]="'star'"
                [title]="'PROCESSES.FLOWCHART.REMOVE_FAVOURITE' | translate"
                    *ngIf="flowchart?.IsUserFavorite && flowchart?.IsLatest && !flowchart?.IsVisibilityRestricted"
                    (click)="removeFavourite()"
                >
               

</kendo-toolbar-button>

 

Warning message

Kendo UI for Angular: Icon type is set to 'svg', but only font icon name is provided. The "checkbox-checked" font icon will be rendered instead.
progress-kendo-angular-icons.mjs:407 Kendo UI for Angular: Icon type is set to 'svg', but only font icon name is provided. The "printer" font icon will be rendered instead.
progress-kendo-angular-icons.mjs:407 Kendo UI for Angular: Icon type is set to 'svg', but only font icon name is provided. The "star" font icon will be rendered instead.
progress-kendo-angular-icons.mjs:407 Kendo UI for Angular: Icon type is set to 'svg', but only font icon name is provided. The "menu" font icon will be rendered instead.

1 Answer, 1 is accepted

Sort by
0
Accepted
Hetali
Telerik team
answered on 06 Jul 2023, 07:38 PM

Hello Behnam,

Indeed, starting v7.0.0 (October 2023), the font icons will be removed from the theme.

To continue using the font icons, please follow the steps below:

1. import ICON_SETTINGS token.

import { ICON_SETTINGS } from "@progress/kendo-angular-icons";
2. Set the type of the IconSettings to 'font'.
@NgModule({
  ...
  providers: [{ provide: ICON_SETTINGS, useValue: { type: 'font' } }]
})

I have created this StackBlitz example where I have used the Font icons.

I hope this information helps. Please let me know if I can further assist you.

Regards,
Hetali
Progress Telerik

As of R2 2023, the default icon type will be SVG instead of Font. See this blogpost for more information.
behnam
Top achievements
Rank 1
commented on 07 Jul 2023, 09:50 AM

Hello Hetali,


Thanks for your response, it works and helped me a lot.


Sincerely,
Behnam 

 

Tags
Button
Asked by
behnam
Top achievements
Rank 1
Answers by
Hetali
Telerik team
Share this question
or