ant-design-blazor/components/segmented/SegmentedItem.razor
James Yeung e892f343de
feat(module: segmented): add new component segmented (#2503)
* add basic segmented

* add more demos

* add animation

* change value first

* fix duplicate selected

* fix doc
2022-06-25 20:56:51 +08:00

26 lines
546 B
C#

@namespace AntDesign
@inherits AntDomComponentBase
@typeparam TValue
<label class="@ClassMapper.Class" style="@Style" id="@Id" @ref="Ref">
<input class="ant-segmented-item-input" type="radio" checked="@_selected">
<div class="ant-segmented-item-label" title="@Label" @onclick="OnClick">
@if (ChildContent != null)
{
@ChildContent
}
else if (Icon != null)
{
<Icon Type="@Icon" />
if (Label != null)
{
<span>@Label</span>
}
}
else
{
@Label
}
</div>
</label>