mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-08-20 20:12:57 +00:00
Added configurable size to MudCopyClipboardButton and updated usage in ContentBlockComponent
This commit is contained in:
parent
8bec202278
commit
60f7743749
@ -1,4 +1,3 @@
|
|||||||
@using System.Runtime.CompilerServices
|
|
||||||
@using AIStudio.Tools
|
@using AIStudio.Tools
|
||||||
@using MudBlazor
|
@using MudBlazor
|
||||||
@using AIStudio.Components
|
@using AIStudio.Components
|
||||||
@ -40,8 +39,7 @@
|
|||||||
<MudIconButton Icon="@Icons.Material.Filled.Delete" Color="Color.Error" OnClick="@this.RemoveBlock"/>
|
<MudIconButton Icon="@Icons.Material.Filled.Delete" Color="Color.Error" OnClick="@this.RemoveBlock"/>
|
||||||
</MudTooltip>
|
</MudTooltip>
|
||||||
}
|
}
|
||||||
<MudCopyClipboardButton Content="@this.Content" Type="@this.Type"/>
|
<MudCopyClipboardButton Content="@this.Content" Type="@this.Type" Size="Size.Medium"/>
|
||||||
|
|
||||||
</CardHeaderActions>
|
</CardHeaderActions>
|
||||||
</MudCardHeader>
|
</MudCardHeader>
|
||||||
<MudCardContent>
|
<MudCardContent>
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
<MudTooltip Text="@this.TooltipMessage" Placement="Placement.Bottom">
|
<MudTooltip Text="@this.TooltipMessage" Placement="Placement.Bottom">
|
||||||
<MudIconButton Icon="@Icons.Material.Filled.ContentCopy" Size="Size.Small" OnClick="@(() => this.HandleCopyClick())"/>
|
<MudIconButton Icon="@Icons.Material.Filled.ContentCopy" Size="@this.Size" OnClick="@(() => this.HandleCopyClick())"/>
|
||||||
</MudTooltip>
|
</MudTooltip>
|
@ -34,6 +34,12 @@ public partial class MudCopyClipboardButton : ComponentBase
|
|||||||
[Parameter]
|
[Parameter]
|
||||||
public string TooltipMessage { get; set; } = TB("Copies the content to the clipboard");
|
public string TooltipMessage { get; set; } = TB("Copies the content to the clipboard");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The size of the button. The default size is small.
|
||||||
|
/// </summary>
|
||||||
|
[Parameter]
|
||||||
|
public Size Size { get; set; } = Size.Small;
|
||||||
|
|
||||||
[Inject]
|
[Inject]
|
||||||
private ISnackbar Snackbar { get; init; } = null!;
|
private ISnackbar Snackbar { get; init; } = null!;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user