using Connected.Annotations; using Connected.Utilities; using Microsoft.AspNetCore.Components; namespace Connected.Components; public partial class SimpleTable : UIComponent { protected string Classname => new CssBuilder("mud-table mud-simple-table") .AddClass($"mud-table-dense", Dense) .AddClass($"mud-table-hover", Hover) .AddClass($"mud-table-bordered", Bordered) .AddClass($"mud-table-outlined", Outlined) .AddClass($"mud-table-striped", Striped) .AddClass($"mud-table-square", Square) .AddClass($"mud-table-sticky-header", FixedHeader) .AddClass($"mud-elevation-{Elevation}", !Outlined) .AddClass(Class) .Build(); /// /// Child content of component. /// [Parameter] [Category(CategoryTypes.SimpleTable.Appearance)] public int Elevation { set; get; } = 1; /// /// If true, the table row will shade on hover. /// [Parameter] [Category(CategoryTypes.SimpleTable.Appearance)] public bool Hover { get; set; } /// /// If true, border-radius is set to 0. /// [Parameter] [Category(CategoryTypes.SimpleTable.Appearance)] public bool Square { get; set; } /// /// If true, compact padding will be used. /// [Parameter] [Category(CategoryTypes.SimpleTable.Appearance)] public bool Dense { get; set; } /// /// If true, table will be outlined. /// [Parameter] [Category(CategoryTypes.SimpleTable.Appearance)] public bool Outlined { get; set; } /// /// If true, table's cells will have left/right borders. /// [Parameter] [Category(CategoryTypes.SimpleTable.Appearance)] public bool Bordered { get; set; } /// /// If true, striped table rows will be used. /// [Parameter] [Category(CategoryTypes.SimpleTable.Appearance)] public bool Striped { get; set; } /// /// When true, the header will stay in place when the table is scrolled. Note: set Height to make the table scrollable. /// [Parameter] [Category(CategoryTypes.SimpleTable.Appearance)] public bool FixedHeader { get; set; } /// /// Child content of the component. /// [Parameter] [Category(CategoryTypes.SimpleTable.Behavior)] public RenderFragment ChildContent { get; set; } }