How do I use an svgIcon as a DrawerItemProp?

0 Answers 108 Views
Drawer FontIcon
Jeff
Top achievements
Rank 1
Jeff asked on 13 Oct 2023, 05:51 PM
I have imported the dollarIcon,

import { dollarIcon } from "@progress/kendo-svg-icons";

Here is the item for the DrawerItemProp

{
  "data-expanded"]: false,      
  id: 600,
  svgIcon: dollarIcon,
  text: "Invoices",
},

The icon does not display. What am I doing wrong?


 
Kiril
Telerik team
commented on 17 Oct 2023, 01:59 PM

Hello, Jeff,

You are using the correct data for the icon. I have created an example with it. Can you confirm if you have the `@progress/kendo-svg-icons` package present in your node modules as well as the icon in question?

Regards,
Kiril

Jeff
Top achievements
Rank 1
commented on 08 Feb 2024, 06:28 PM

Sorry for the long delay in response. Just getting back to this project.

I have confirmed that kendo-svg-icons is present in package.json and in node_modules.
"@progress/kendo-svg-icons": "^2.1.0"

I added an item exactly ask shown in your example:

  { text: 'Inbox', svgIcon: dollarIcon, selected: true },

The item appears in the menu, but the svgIcon is still not displayed.

No answers yet. Maybe you can help?

Tags
Drawer FontIcon
Asked by
Jeff
Top achievements
Rank 1
Share this question
or