mirror of
https://github.com/radzenhq/radzen-blazor.git
synced 2026-02-04 05:35:44 +00:00
35 lines
913 B
Plaintext
35 lines
913 B
Plaintext
@using Microsoft.AspNetCore.Components.Routing
|
|
@using Microsoft.JSInterop
|
|
@inherits RadzenComponentWithChildren
|
|
|
|
@if (Item?.Parent?.ClickToOpen == true)
|
|
{
|
|
<li style=@Style @attributes="@Attributes" @onclick="@Item.OnClick" @onclick:stopPropagation>
|
|
@ChildContent
|
|
</li>
|
|
}
|
|
else
|
|
{
|
|
if (Item?.ChildContent != null)
|
|
{
|
|
<li style=@Style @attributes="@Attributes" onmouseenter="Radzen.toggleMenuItem(this, event, true, false)" onmouseleave="Radzen.toggleMenuItem(this, event, false, false)">
|
|
@ChildContent
|
|
</li>
|
|
}
|
|
else
|
|
{
|
|
<li style=@Style @attributes="@Attributes" @onclick="@(Item!.OnClick)" @onclick:stopPropagation>
|
|
@ChildContent
|
|
</li>
|
|
}
|
|
}
|
|
|
|
@code {
|
|
|
|
/// <summary>
|
|
/// Gets or sets the menu item.
|
|
/// </summary>
|
|
/// <value>The menu item.</value>
|
|
[Parameter]
|
|
public RadzenMenuItem? Item { get; set; }
|
|
} |