1
0
mirror of https://github.com/chylex/Minecraft-Phantom-Panel.git synced 2024-12-22 16:42:50 +01: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; }
}