Skip to content

Commit 1cfe489

Browse files
authored
docs(menu): Fix template styling and article tabs (#875)
1 parent 21c4c6c commit 1cfe489

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

components/menu/templates.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,14 @@ Use your own NavLink elements for navigation instead of the built-in feature of
3030
var shouldNavigate = !string.IsNullOrEmpty(item.Page);
3131
if (shouldNavigate)
3232
{
33-
<NavLink href="@item.Page">@item.Section</NavLink>
33+
@*k-menu-link-text will expand the NavLink to match default Menu styling*@
34+
<NavLink href="@item.Page" class="k-menu-link-text">@item.Section</NavLink>
3435
}
3536
else
3637
{
37-
<span style="font-weight: bold;">See more about our @item.Section.ToLowerInvariant()</span>
38+
@*k-menu-link-text will expand the span to match default Menu styling*@
39+
<span style="font-weight: bold;" class="k-menu-link-text">
40+
See more about our @item.Section.ToLowerInvariant()</span>
3841
}
3942
}
4043
</ItemTemplate>
@@ -53,12 +56,12 @@ Use your own NavLink elements for navigation instead of the built-in feature of
5356
protected override void OnInitialized()
5457
{
5558
MenuItems = new List<MenuItem>()
56-
{
59+
{
5760
new MenuItem()
5861
{
5962
Section = "Company",
6063
SubSectionList = new List<MenuItem>()
61-
{
64+
{
6265
new MenuItem()
6366
{
6467
Section = "Overview",
@@ -80,7 +83,7 @@ Use your own NavLink elements for navigation instead of the built-in feature of
8083
{
8184
Section = "Services",
8285
SubSectionList = new List<MenuItem>()
83-
{
86+
{
8487
new MenuItem()
8588
{
8689
Section = "Consulting",
@@ -110,7 +113,8 @@ Use your own NavLink elements for navigation instead of the built-in feature of
110113
@{
111114
if (EqualityComparer<MenuItem>.Default.Equals(item, SelectedMenuItem))
112115
{
113-
<span style="color: black; font-weight: bold">@item.Text</span>
116+
@*k-menu-link-text will expand the span to match default Menu styling*@
117+
<span style="color: black; font-weight: bold" class="k-menu-link-text">@item.Text</span>
114118
}
115119
else
116120
{
@@ -119,7 +123,8 @@ Use your own NavLink elements for navigation instead of the built-in feature of
119123
{
120124
target = "_blank";
121125
}
122-
<NavLink target="@target" href="@item.Url" class="k-link k-menu-link">@item.Text</NavLink>
126+
@*k-menu-link-text will expand the NavLink to match default Menu styling*@
127+
<NavLink target="@target" href="@item.Url" class="k-menu-link-text">@item.Text</NavLink>
123128
}
124129
}
125130
</ItemTemplate>
@@ -194,8 +199,8 @@ Use your own NavLink elements for navigation instead of the built-in feature of
194199
}
195200
return !(url.StartsWith("https://") || url.StartsWith("http://"));
196201
}
197-
198-
public class MenuItem
202+
203+
public class MenuItem
199204
{
200205
public string Text { get; set; }
201206
public string Url { get; set; }
@@ -210,6 +215,5 @@ Use your own NavLink elements for navigation instead of the built-in feature of
210215

211216
## See Also
212217

213-
* [Data Binding a Menu]({%slug components/menu/data-binding/overview%})
214-
* [Live Demo: Menu Temlate](https://demos.telerik.com/blazor-ui/menu/template)
215-
218+
* [Data Binding a Menu]({%slug components/menu/data-binding/overview%})
219+
* [Live Demo: Menu Temlate](https://demos.telerik.com/blazor-ui/menu/template)

0 commit comments

Comments
 (0)