ant-design-blazor/components/checkbox/CheckboxGroup.razor
2020-06-02 20:27:53 +08:00

21 lines
705 B
C#

@namespace AntDesign
@inherits AntDomComponentBase
<CascadingValue Value="this">
<div class="@ClassMapper.Class" style="@Style" id="@Id" @ref="Ref">
@if (Options != null)
{
@foreach (var option in Options)
{
<Checkbox class="ant-checkbox-group-item"
Disabled="option.Disabled || Disabled"
Checked="@(option.Checked)"
Label="@option.Value"
CheckedChange="_=>OnOptionChange()">
<span>@option.Label</span>
</Checkbox>
}
}
@ChildContent
</div>
</CascadingValue>