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

25 lines
879 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=@(_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>
@if (_formValidation != null)
{
@_formValidation(this);
}
</AntDesign.Col>
</Row>