ant-design-blazor/components/menu/MenuItem.razor
ElDiddi f710fdae11 feat(module: menu): Menu Multiple and Menu-Item Title (#787)
* fix(module: menu): multiple and accordion demo

Co-authored-by: Lars Diederich <diederich@evodata.de>
Co-authored-by: ElderJames <shunjiey@hotmail.com>
2020-11-16 12:57:42 +08:00

22 lines
612 B
C#

@namespace AntDesign
@inherits AntDomComponentBase
<CascadingValue Value="this">
<li class="@ClassMapper.Class" role="menuitem" style=" @(PaddingLeft>0? $"padding-left:{PaddingLeft}px;":"") @Style" @onclick="HandleOnClick" @key="Key">
@if (RouterLink == null)
{
if (Title != null)
{
@Title
}
else
{
@ChildContent
}
}
else
{
<MenuLink Href="@RouterLink" Match="@RouterMatch">@ChildContent</MenuLink>
}
</li>
</CascadingValue>