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/Cell.razor

25 lines
593 B
Plaintext

@using Phantom.Web.Components.Utils
@if (Url == null) {
<td @attributes="AdditionalAttributes">
@ChildContent
</td>
}
else {
<td @attributes="AdditionalAttributes" class="@(BlazorUtils.CombineClassNames(AdditionalAttributes, "p-0"))">
<a class="table-link" href="@Url">@ChildContent</a>
</td>
}
@code {
[CascadingParameter(Name = "Url")]
public string? Url { get; set; }
[Parameter]
public RenderFragment? ChildContent { get; set; }
[Parameter(CaptureUnmatchedValues = true)]
public IReadOnlyDictionary<string, object>? AdditionalAttributes { get; set; }
}