ant-design-blazor/components/form/FormItem.razor

22 lines
856 B
C#
Raw Normal View History

@namespace AntDesign
@inherits AntDomComponentBase
@using AntDesign.Internal;
<Row class="@ClassMapper.Class" style="@Style" id="@Id">
@if (!string.IsNullOrEmpty(Label))
{
<AntDesign.Col @attributes="GetLabelColAttributes()" class=@($"{_prefixCls}-label")>
<label class=@(Required ? $"{_prefixCls}-required" : _labelCls)> @(Label)</label>
</AntDesign.Col>
}
<AntDesign.Col @attributes="GetWrapperColAttributes()" class=@($"{_prefixCls}-control")>
<div class=@($"{_prefixCls}-control-input")>
<div class=@($"{_prefixCls}-control-input-content")>
<CascadingValue Value="this" Name="FormItem" TValue="IFormItem">
@ChildContent
</CascadingValue>
</div>
</div>
@_formValidationMessages
</AntDesign.Col>
</Row>