Hi Yan,
Thanks for contacting Syncfusion Forums.
QUERY: Custom icon toolbar with font awesome icon
From your query we understand that you need to add font awesome icon to the custom toolbar option. This can be done by adding a class to the prefixIcon property of custom toolbar option and setting icon to that class.
Please refer the below code snippet,
In index.html
<head>
<link rel='nofollow' href="//cdn.syncfusion.com/ej2/material.css" rel="stylesheet" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" rel='nofollow' href="favicon.ico">
</head>
In app.component.ts
ngOnInit(): void {
this.toolbar= ['ExpandAll', 'CollapseAll', {text: 'Quick Filter', tooltipText: 'Quick Filter', id: 'refresh', prefixIcon: 'e-test'}];
}
In app.component.css
.e-treegrid .e-toolbar-item .e-test::before {
font: normal normal normal 14px/1 FontAwesome;
content: "\f06e";
}
|
Please refer the below screenshot,
In this way you can set font awesome icon to custom toolbar.
Please refer the below sample,
If you have further queries, please get back to us.
Regards,
Padmavathy Kamalanathan