Files
Heimdall/src/Heimdall.Web/Components/Shared/LoadingSkeleton.razor
T

36 lines
959 B
Plaintext

@* Skeleton loading placeholder for cards and content areas. *@
<MudPaper Elevation="1" Class="@($"pa-4 {Class}")" Style="border-radius: 8px;">
@if (ShowTitle)
{
<MudSkeleton Width="200px" Height="24px" />
}
@for (int i = 0; i < LineCount; i++)
{
<MudSkeleton Width="@(i == 0 ? "100%" : i % 2 == 0 ? "80%" : "90%")"
Height="40px" Class="@(i > 0 ? "mt-1" : "mt-2")" />
}
</MudPaper>
@code {
/// <summary>
/// Number of skeleton content lines to render. Defaults to 4.
/// </summary>
[Parameter]
public int LineCount { get; set; } = 4;
/// <summary>
/// Whether to show a title skeleton row at the top. Defaults to true.
/// </summary>
[Parameter]
public bool ShowTitle { get; set; } = true;
/// <summary>
/// Additional CSS classes applied to the paper.
/// </summary>
[Parameter]
public string Class { get; set; } = string.Empty;
}