英文:
How to convert Font Awesome IconDefinition to Kendo UI SVGIcon
问题
Kendo UI 最近默认开始使用 SVG 图标在它们的小部件中 (链接), 但它们的图标选择不太理想。我想要使用FontAwesome图标,但它们有不同的变量类型。我应该如何做?
英文:
Kendo UI recently just moved to using SVG icons by default in their widgets (link), but their selection of icons is not very good. I would like to use FontAwesome icons instead, but they have different variable types. How can I do this?
答案1
得分: 1
我联系了Telerik的支持团队,他们帮助了我:
我的代码
import { SVGIcon } from '@progress/kendo-svg-icons';
import { faHouse } from '@fortawesome/pro-regular-svg-icons';
public faHouse: SVGIcon = {
name: faHouse.iconName,
content: `<path d="${faHouse.icon[4]}" />`,
viewBox: `0 0 ${faHouse.icon[0]} ${faHouse.icon[1]}`,
};
英文:
I reached out to Telerik's support and they helped me:
My Code
import { SVGIcon } from '@progress/kendo-svg-icons';
import { faHouse } from '@fortawesome/pro-regular-svg-icons';
public faHouse: SVGIcon = {
name: faHouse.iconName,
content: `<path d="${faHouse.icon[4]}" />`,
viewBox: `0 0 ${faHouse.icon[0]} ${faHouse.icon[1]}`,
};
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论