ant-design-blazor/components/input/AntInputGroup.razor.cs
Brian Ding 9c98b27e3b add component input (#33)
* add input component

* fix menu
2020-03-23 09:31:08 +08:00

27 lines
764 B
C#

using Microsoft.AspNetCore.Components;
namespace AntBlazor
{
public partial class AntInputGroup : AntDomComponentBase
{
protected const string PrefixCls = "ant-input-group";
[Parameter]
public RenderFragment ChildContent { get; set; }
[Parameter]
public string size { get; set; }
protected override void OnInitialized()
{
base.OnInitialized();
ClassMapper.Clear()
.Add(PrefixCls)
.If($"{PrefixCls}-lg", () => size == AntInputSize.Large)
.If($"{PrefixCls}-sm", () => size == AntInputSize.Small)
.If($"{PrefixCls}-compact", () => Attributes != null && Attributes.ContainsKey("compact"));
}
}
}