ant-design-blazor/components/list/AntListItem.razor.cs
James Yeung 9351a35072 docs: refactor the layout closer to the official document (#100)
* docs: add cli for building demo structured file

* docs: cli improvement

* docs: generate demo page

* fix: style of components page

* docs: add prism to mack source code highlight

* feat: add menu2json command for cli

* fix: markdown highlight

* feat: fetch menu data from cli output files

* fix: cli

* docs: add avatar demo

* docs: add button demos

* docs: add component-scope style

* docs: fix style

* docs: add badge demos

* fix: rebase conflict

* docs: refactor layout

* docs: fix navigation

* docs: fix rebase conflict

* docs: add AntAffix for sider menu

* docs: fix affix error

* docs: fix rebase confilct
2020-05-10 15:42:02 +08:00

46 lines
1.1 KiB
C#

using Microsoft.AspNetCore.Components;
using System;
using System.Collections.Generic;
using System.Text;
namespace AntBlazor
{
public partial class AntListItem : AntDomComponentBase
{
internal string _prefixName = "ant-list-item";
[Parameter] public string Content { get; set; }
[Parameter] public RenderFragment Extra { get; set; }
// todo: list
[Parameter] public string Actions { get; set; }
[Parameter] public AntDirectionVHIType ItemLayout { get; set; } = AntDirectionVHIType.Horizontal;
[Parameter] public RenderFragment ChildContent { get; set; }
public bool IsVerticalAndExtra()
{
return this.ItemLayout == AntDirectionVHIType.Vertical && this.Extra != null;
}
protected override void OnInitialized()
{
SetClassMap();
}
protected override void OnParametersSet()
{
base.OnParametersSet();
SetClassMap();
}
protected void SetClassMap()
{
ClassMapper.Clear()
.Add(_prefixName);
}
}
}