1
0
mirror of https://github.com/chylex/Minecraft-Phantom-Panel.git synced 2025-09-30 23:02:48 +02:00
Files

36 lines
637 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(separator: ';', styles);
}
}