mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-16 01:41:14 +08:00
99e7745598
Co-authored-by: ElderJames <shunjiey@hotmail.com>
31 lines
908 B
C#
31 lines
908 B
C#
using System.Collections.Generic;
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
namespace AntBlazor
|
|
{
|
|
public partial class InputGroup : AntDomComponentBase
|
|
{
|
|
protected const string PrefixCls = "ant-input-group";
|
|
|
|
[Parameter]
|
|
public RenderFragment ChildContent { get; set; }
|
|
|
|
[Parameter]
|
|
public string Size { get; set; }
|
|
|
|
[Parameter(CaptureUnmatchedValues = true)]
|
|
public Dictionary<string, object> Attributes { 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", () => Attributes != null && Attributes.ContainsKey("compact"));
|
|
}
|
|
}
|
|
}
|