mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-16 08:53:48 +00: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!;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user