ant-design-blazor/components/avatar/AvatarGroup.razor
James Yeung 66f6183e0f feat(module: avatar): add avatar group (#677)
feat: add max count style

feat(module: avatar): add avatar group
2020-10-14 13:56:59 +08:00

26 lines
876 B
C#

@namespace AntDesign
@inherits AntDomComponentBase
<CascadingValue Value="this">
<div class="ant-avatar-group">
<CascadingValue Value=@("shown") Name="position">
@ChildContent
</CascadingValue>
@if (_overflow)
{
<Popover Trigger="new[] { TriggerType.Hover}"
Placement=MaxPopoverPlacement
OverlayClassName=@($"{_prefixCls}-popover")>
<ContentTemplate>
<CascadingValue Value=@("hidden") Name="position">
@ChildContent
</CascadingValue>
</ContentTemplate>
<ChildContent>
<Avatar Style=@MaxStyle>@($"+{_shownAvatarList.Count - MaxCount}")</Avatar>
</ChildContent>
</Popover>
}
</div>
</CascadingValue>