A UI Razor component for an empty state panel. It renders an icon, title and optional subtitle and computes a hash from those properties.
@namespace Sunless.Libraries.UI
@using Sandbox
@using Sandbox.UI
@attribute [StyleSheet]
@inherits Panel
<root>
<div class="empty">
<div class="empty-icon">@Icon</div>
<div class="empty-title">@Title</div>
@if ( !string.IsNullOrEmpty( Sub ) )
{
<div class="empty-sub">@Sub</div>
}
</div>
</root>
@code
{
public string Icon { get; set; } = "-- --";
public string Title { get; set; } = "";
public string Sub { get; set; } = "";
protected override int BuildHash() => HashCode.Combine( Icon, Title, Sub );
}