1
0
mirror of https://github.com/chylex/Minecraft-Phantom-Panel.git synced 2024-10-17 03:42:50 +02:00
Minecraft-Phantom-Panel/Web/Phantom.Web.Components/Tables/Column.razor
2023-12-20 06:11:24 +01:00

36 lines
634 B
Plaintext

<th style="@style" class="@Class">
@ChildContent
</th>
@code {
[Parameter]
public string Class { get; set; } = string.Empty;
[Parameter]
public string? MinWidth { get; set; }
[Parameter]
public string? Width { get; set; }
[Parameter]
public RenderFragment? ChildContent { get; set; }
private string style = string.Empty;
protected override void OnParametersSet() {
List<string> styles = new (2);
if (MinWidth != null) {
styles.Add("min-width: " + MinWidth);
}
if (Width != null) {
styles.Add("width: " + Width);
}
style = string.Join(';', styles);
}
}