ant-design-blazor/components/collapse/Panel.razor

33 lines
1.1 KiB
C#
Raw Normal View History

@namespace AntDesign
@inherits AntDomComponentBase
<div class="@ClassMapper.Class" style="@Style" id="@Id">
<div class="ant-collapse-header" @onclick="OnHeaderClick" role="button" aria-expanded="@(Active?"true":"false")">
@if (ShowArrow)
{
@if (Collapse.ExpandIconTemplate != null)
{
@Collapse.ExpandIconTemplate(Active)
}
else
{
<Icon Type="@Collapse.ExpandIcon" Class="ant-collapse-arrow" Rotate="@(Active ? 90 : 0)" />
}
}
@if (HeaderTemplate != null)@HeaderTemplate else @Header
@if (Extra != null || ExtraTemplate != null)
{
<div class="ant-collapse-extra">
@if (ExtraTemplate != null)@ExtraTemplate else @Extra
</div>
}
</div>
<div class="ant-collapse-content @(Active?"ant-collapse-content-active":"ant-collapse-content-inactive ant-collapse-content-hidden")">
<div class="ant-collapse-content-box">
@ChildContent
</div>
</div>
</div>