ant-design-blazor/components/descriptions/DescriptionsItem.razor.cs
TimChen d68a2dbb87 feat: add Descriptions component (#224)
* feat: add page-header components

* feat: add page-header components

* feat: add page-header components

* docs: some bugs of PageHeader

* refactor: clean code

* feat: add Descriptions component

* feat: add Descriptions component

* feat: add Descriptions component

* feat: add Descriptions component

* feat: add Descriptions component

* fix: demo

Co-authored-by: ElderJames <shunjiey@hotmail.com>
2020-06-15 22:23:08 +08:00

31 lines
741 B
C#

using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
using OneOf;
namespace AntDesign
{
public partial class DescriptionsItem : AntDomComponentBase, IDescriptionsItem
{
[Parameter]
public OneOf<string, RenderFragment> Title { get; set; } = "";
[Parameter]
public int Span { get; set; } = 1;
[Parameter]
public RenderFragment ChildContent { get; set; }
[CascadingParameter]
public Descriptions Descriptions { get; set; }
protected override void OnInitialized()
{
this.Descriptions?.Items.Add(this);
base.OnInitialized();
}
}
}