29 lines
1.0 KiB
Plaintext
29 lines
1.0 KiB
Plaintext
@if (ChildContent is not null) {
|
|
@* Desktop: inline button group *@
|
|
<CascadingValue Value="ResponsiveActionVariant.Desktop">
|
|
<div class="d-none d-md-flex gap-1 align-items-center">
|
|
@ChildContent
|
|
</div>
|
|
</CascadingValue>
|
|
@* Mobile: dropdown menu *@
|
|
<div class="btn-group btn-group-sm d-md-none">
|
|
<button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown">
|
|
<i class="bi bi-three-dots-vertical"></i>
|
|
</button>
|
|
<ul class="dropdown-menu dropdown-menu-end">
|
|
<CascadingValue Value="ResponsiveActionVariant.Mobile">
|
|
@ChildContent
|
|
</CascadingValue>
|
|
</ul>
|
|
</div>
|
|
}
|
|
|
|
@code {
|
|
/// <summary>
|
|
/// The action buttons, defined once and rendered as a desktop inline group and a mobile dropdown.
|
|
/// Each button is an <see cref="ActionButton"/> whose styling adapts to the current variant.
|
|
/// </summary>
|
|
[Parameter]
|
|
public RenderFragment? ChildContent { get; set; }
|
|
}
|