Inject icons since 6.4.0

Since 6.4.0 Eval inside componts is secured - this is fine. But i used it to font awesome icons:

<RadzenButton Icon="@("<i class=\"fa fa-map\"></i>")"  />

How to achieve this in >6.4.0 ?

Hi @meron1122,

There are two ways to do this:

  1. Set the content of the button directly:
    <RadzenButton><i class="fa fa-map"></i></RadzenButton>
    
  2. Try the approach described here (you would need to use the hex code corresponding to fa-map):
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css">
    <style>
    .fa {
       --rz-icon-font-family: "Font Awesome 6 Free";
    }
    </style>
    <RadzenButton class="fa" Icon="@("\uf279")" />
    
1 Like