ant-design-blazor/components/drawer/Drawer.razor
Henry.zhang 42cd8da17d feat: add drawer demo (#123)
* fix:  AntDrawer title 无法显示问题。
fix:  AntDrawer closeable 无法关闭的问题

* docs: more Drawer demos

* fix: a wrong filename in drawer demo

* docs: drawer demo finish

* docs: drawer demos, basic,placement , form , profile,multiple-level

* fix: render a drawer in a container

* fix: onclick event name

* fix: demo directory name

* refactor: rename drawer

Co-authored-by: ElderJames <shunjiey@hotmail.com>
2020-05-18 18:42:22 +08:00

52 lines
2.0 KiB
Plaintext

@namespace AntBlazor
@inherits AntDomComponentBase
<div class="@ClassMapper.Class" @ref="@Ref" style="@DrawerStyle @Style" id="@Id">
@if (Mask)
{
<div class="ant-drawer-mask" @onclick="_=>MaskClick()" style="@MaskStyle"></div>
}
<div class="ant-drawer-content-wrapper @WrapClassName " style="@WrapperStyle">
<div class="ant-drawer-content">
<div class="ant-drawer-wrapper-body" style="@(IsLeftOrRight?"height:100%":"")">
@if (_title.Value != null || Closable)
{
<div class="@TitleClassMapper.Class">
@if (_title.Value != null)
{
<div class="ant-drawer-title">
@if (TitleTemplate != null)
{
@TitleTemplate
}
@if (!string.IsNullOrEmpty(TitleString))
{
@((MarkupString)TitleString)
}
</div>
}
@if (Closable)
{
<button @onclick="_=>CloseClick()" aria-label="Close" class="ant-drawer-close">
<AntIcon type="close"></AntIcon>
</button>
}
</div>
}
<div class="ant-drawer-body" style="@BodyStyle">
@if (ContentTemplate != null)
{
@ContentTemplate
}
@if (string.IsNullOrEmpty(ContentString))
{
@((MarkupString)ContentString)
}
@ChildContent
</div>
</div>
</div>
</div>
</div>