ant-design-blazor/components/collapse/Panel.razor
TimChen 648f9c6a6b feat: add collapse component (#226)
Co-authored-by: ElderJames <shunjiey@hotmail.com>
2020-06-17 14:26:47 +08:00

47 lines
1.2 KiB
C#

@namespace AntDesign
@inherits AntDomComponentBase
<div class="@ClassMapper.Class" style="@Style" id="@Id">
<div class="ant-collapse-header" @onclick="OnClickHeader">
@if (ShowArrow)
{
@if (Collapse.ExpandIcon.IsT0 && Collapse.ExpandIcon.AsT0)
{
<Icon Type="right" Theme="outline" Class="ant-collapse-arrow" Rotate="@(Active ? 90 : 0)" />
}
else if (Collapse.ExpandIcon.AsT1 != null)
{
@Collapse.ExpandIcon.AsT1(Active)
}
}
@if (Header.IsT0)
{
@Header.AsT0
}
else
{
@Header.AsT1
}
@if (Extra.Value != null)
{
<div class="ant-collapse-extra">
@if (Extra.IsT0)
{
@Extra.AsT0
}
else
{
@Extra.AsT1
}
</div>
}
</div>
<div class="ant-collapse-content @(Active?"":"ant-collapse-content-inactive")">
<div class="ant-collapse-content-box">
@ChildContent
</div>
</div>
</div>