ant-design-blazor/components/checkbox/CheckboxGroup.razor
Henry.zhang 826df9d055 feat: new demo for switch, radio, slider and inputnumber (#155)
* feat: new demo for switch, radio, slider and inputnumber

* fix: remove some blank in demo doc api section

* fix: format the code in demo

* fix: checkbox and switch

Co-authored-by: ElderJames <shunjiey@hotmail.com>
2020-05-28 16:56:52 +08:00

21 lines
705 B
C#

@namespace AntBlazor
@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)"
Value="@option.Value"
CheckedChange="_=>OnOptionChange()">
<span>@option.Label</span>
</Checkbox>
}
}
@ChildContent
</div>
</CascadingValue>