@namespace DnsmasqWebUI.Components.EffectiveConfig @inject IJSRuntime JSRuntime
@Text
@code { [Parameter] public string Text { get; set; } = ""; [Parameter] public string? CssClass { get; set; } [Parameter] public string? CodeCssClass { get; set; } [Parameter] public string CopyTitle { get; set; } = "Copy"; private async Task CopyAsync() { if (string.IsNullOrEmpty(Text)) return; try { await JSRuntime.InvokeVoidAsync("copyToClipboard", Text); } catch { // Clipboard not available or failed } } }