ant-design-blazor/components/layout/Layout.razor
James Yeung d2e9c4b247 feat(module: config-provider): support RTL (#1238)
* feat(module: config-provider): support RTL

* add rtl for each component

* fix rtl for pagination

* add rtl for overlay
2021-03-31 19:23:26 +08:00

35 lines
671 B
C#

@namespace AntDesign
@inherits AntDomComponentBase
<CascadingValue Value="this" IsFixed="@true">
<section class="@ClassMapper.Class" style="@Style" id="@Id">
@ChildContent
</section>
</CascadingValue>
@code
{
[Parameter]
public RenderFragment ChildContent { get; set; }
private bool _hasSider;
protected override void OnInitialized()
{
base.OnInitialized();
ClassMapper
.Add("ant-layout")
.If("ant-layout-has-sider", () => _hasSider)
.If("ant-layout-rtl", () => RTL);
}
internal void HasSider()
{
_hasSider = true;
StateHasChanged();
}
}