feat: edit print templates on the printer page and store them on presets
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
@foreach (var token in Tokens)
|
||||
{
|
||||
var name = token;
|
||||
<span class="d-inline-flex align-center mr-1 mb-1">
|
||||
<MudChip T="string"
|
||||
Size="Size.Small"
|
||||
OnClick="() => Insert.InvokeAsync(name)">
|
||||
{{@name}}
|
||||
</MudChip>
|
||||
<MudTooltip Text="Copy">
|
||||
<MudIconButton Icon="@Icons.Material.Filled.ContentCopy"
|
||||
Size="Size.Small"
|
||||
OnClick="() => Copy.InvokeAsync(name)" />
|
||||
</MudTooltip>
|
||||
</span>
|
||||
}
|
||||
|
||||
@code {
|
||||
[Parameter, EditorRequired]
|
||||
public IReadOnlyList<string> Tokens { get; set; } = [];
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<string> Insert { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<string> Copy { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user