ant-design-blazor/components/input/InputGroup.razor.cs
James Yeung d16144ece0 refactor: remove the 'ant' prefix for some components that is already in demos (#162)
* refactor: button

* refactor: avatar

* refactor: alert

* fix: input group compact
2020-05-29 12:55:15 +08:00

31 lines
804 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);
}
}
}