ant-design-blazor/components/card/CardMeta.razor

46 lines
939 B
C#
Raw Normal View History

@namespace AntDesign
2019-12-17 14:39:23 +08:00
@inherits AntDomComponentBase
<div class="@ClassMapper.Class" style="@Style" id="@Id">
2019-12-17 14:39:23 +08:00
@if (Avatar != null)
{
<div class="ant-card-meta-avatar">
@Avatar
</div>
}
@if (Title != null || Description != null)
{
<div class="ant-card-meta-detail">
@if (Title != null)
{
<div class="ant-card-meta-title">
@Title
</div>
}
@if (Description != null)
{
@Description
}
</div>
}
</div>
@code{
[Parameter]
public RenderFragment Title { get; set; }
2019-12-17 14:39:23 +08:00
[Parameter]
public RenderFragment Description { get; set; }
2019-12-17 14:39:23 +08:00
[Parameter]
public RenderFragment Avatar { get; set; }
2019-12-17 14:39:23 +08:00
protected override void OnInitialized()
{
base.OnInitialized();
ClassMapper.Add("ant-card-meta");
}
}