UI for Pandoc integration (#393)

Co-authored-by: Thorsten Sommer
This commit is contained in:
nilskruthoffandThorsten Sommer authored and GitHub committed 2025-05-29 14:01:56 +02:00
1 parent 1d31fd9a22
commit 5b685193ef
15 files changed
+766 -4

No files matched your search

@@ -0,0 +1,30 @@
using Microsoft.AspNetCore.Components;
namespace AIStudio.Components;
public partial class CodeTabs : ComponentBase
{
[Parameter]
public RenderFragment? ChildContent { get; set; }
private readonly List<CodeTabItem> blocks = new();
private int selectedIndex;
internal void RegisterBlock(string title, RenderFragment fragment)
{
this.blocks.Add(new CodeTabItem
{
Title = title,
Fragment = fragment,
});
this.StateHasChanged();
}
private class CodeTabItem
{
public string Title { get; init; } = string.Empty;
public RenderFragment Fragment { get; init; } = null!;
}
}