ant-design-blazor/components/input/InputGroup.razor.cs
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

32 lines
855 B
C#

using System.Collections.Generic;
using Microsoft.AspNetCore.Components;
namespace AntDesign
{
public partial class InputGroup : AntDomComponentBase
{
protected const string PrefixCls = "ant-input-group";
[Parameter]
public RenderFragment ChildContent { get; set; }
[Parameter]
public bool Compact { get; set; }
[Parameter]
public string Size { get; set; }
protected override void OnInitialized()
{
base.OnInitialized();
ClassMapper.Clear()
.Add(PrefixCls)
.If($"{PrefixCls}-lg", () => Size == InputSize.Large)
.If($"{PrefixCls}-sm", () => Size == InputSize.Small)
.If($"{PrefixCls}-compact", () => Compact)
.If($"{PrefixCls}-rtl", () => RTL);
}
}
}