mirror of
https://github.com/chylex/Minecraft-Phantom-Panel.git
synced 2024-12-22 16:42:50 +01:00
36 lines
634 B
Plaintext
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);
|
|
}
|
|
|
|
}
|