ant-design-blazor/components/checkbox/Checkbox.razor
James Yeung 698ae84ab1
feat(module: checkbox): support generic value (#3715)
* feat(module: checkbox): support generic value

* fix tests

* fix test

* fix name

* fix tests

* fix tests
2024-04-02 22:15:48 +08:00

31 lines
752 B
C#

@namespace AntDesign
@inherits AntInputBoolComponentBase
<label class="@ClassMapperLabel.Class" style="@Style" for="@Id" @ref="Ref">
<span class="@ClassMapper.Class">
<input id="@Id"
value="@(CheckboxGroup==null?"true":Label)"
checked="@Checked"
disabled="@IsDisabled"
autofocus=@AutoFocus
@onchange="@InputCheckedChange"
type="checkbox"
class="ant-checkbox-input"
@attributes="_attributes" />
<span class="ant-checkbox-inner"></span>
</span>
@if (ChildContent != null)
{
<span>
@ChildContent
</span>
}
else
{
<span>@Label</span>
}
</label>