Skip to content

Commit 4d81467

Browse files
svdimitrjivanova
authored andcommitted
docs(icons): drawer and menu
1 parent a615e9f commit 4d81467

File tree

2 files changed

+7
-17
lines changed

2 files changed

+7
-17
lines changed

components/drawer/icons.md

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,7 @@ position: 22
1010

1111
# Drawer Icons
1212

13-
You can put an image, an icon class or a font icon for each item in the Drawer to illustrate its purpose for your end users. To apply them, use the following properties:
14-
15-
* for a [Telerik font icon]({%slug general-information/font-icons%}), point the `IconField` parameter of the component to a `string` field of the model that contains the corresponding icon name.
16-
17-
* for a raster image, point the `ImageUrlField` parameter of the component to a `string` field of the model that contains the url to the icon (relative or absolute).
18-
19-
* for a custom font icon class, point the `IconClassField` parameter of the component to a `string` field of the model that contains the desired CSS class list which provides the required rules (like font name and glyph symbol). Make sure to also reference the desired font in your app and to use its own recommendations.
20-
21-
The `IconClassField` and `ImageUrlField` are rendered, respectively, as `<span class="the custom class" />` and as `<img src="the-image-src" />`
13+
You can add a [Telerik Font or SVG icon]({%slug general-information/font-icons%}) to the Breadcrumb item by assigning a `string` to the `IconField` parameter.
2214

2315
>caption How to use icons in Telerik Drawer
2416
@@ -33,7 +25,7 @@ The `IconClassField` and `ImageUrlField` are rendered, respectively, as `<span c
3325
@ref="@DrawerRef"
3426
@bind-SelectedItem="@SelectedItem">
3527
<DrawerContent>
36-
<TelerikButton OnClick="@(() => DrawerRef.ToggleAsync())" Icon="menu">Toggle drawer</TelerikButton>
28+
<TelerikButton OnClick="@(() => DrawerRef.ToggleAsync())" Icon="@("menu")">Toggle drawer</TelerikButton>
3729
<div class="m-5">
3830
Selected Item: @SelectedItem?.Text
3931
</div>
@@ -46,15 +38,15 @@ The `IconClassField` and `ImageUrlField` are rendered, respectively, as `<span c
4638
DrawerItem SelectedItem { get; set; }
4739
IEnumerable<DrawerItem> Data { get; set; } = new List<DrawerItem>()
4840
{
49-
new DrawerItem { Text = "Current Location", TelerikIcon = "pin"},
50-
new DrawerItem { Text = "Navigation", TelerikIcon = "globe"},
51-
new DrawerItem { Text = "Favourite Locations", TelerikIcon = "star"},
41+
new DrawerItem { Text = "Current Location", TelerikIcon = FontIcon.Pin},
42+
new DrawerItem { Text = "Navigation", TelerikIcon = FontIcon.Globe},
43+
new DrawerItem { Text = "Favourite Locations", TelerikIcon = FontIcon.Star},
5244
};
5345
5446
public class DrawerItem
5547
{
5648
public string Text { get; set; }
57-
public string TelerikIcon { get; set; }
49+
public FontIcon? TelerikIcon { get; set; }
5850
}
5951
}
6052
````

components/menu/data-binding/overview.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The menu items provide the following features that you control through the corre
3838

3939
* `Text` - the text that will be shown on the item.
4040

41-
* `ImageUrl` / `Icon` / `ImageClass` - the URL to a raster image, the [Telerik icon]({%slug general-information/font-icons%}), or a class for a custom font icon that will be rendered in the item. They have the listed order of precedence in case more than one is present in the data (that is, an `ImageUrl` will have the highest importance).
41+
* `Icon` - The [Telerik Font or SVG icon]({%slug general-information/font-icons%}) that will be rendered in the item. Read more in the [Icons article]({%slug breadcrumb-icons%}).
4242

4343
* `Url` - the view the item will navigate to by generating a link.
4444

@@ -53,9 +53,7 @@ The properties of a menu item match directly to a field of the model the menu is
5353
* IdField => Id
5454
* ParentIdField => ParentId
5555
* TextField => Text
56-
* IconClassField => IconClass
5756
* IconField => Icon
58-
* ImageUrlField => ImageUrl
5957
* UrlField => Url
6058
* HasChildrenField => HasChildren
6159
* ItemsField => Items

0 commit comments

Comments
 (0)