Files
aliasvault/apps/server/Shared/AliasVault.RazorComponents/Buttons/ConfirmButton.razor
2025-04-30 19:03:18 +02:00

27 lines
597 B
Plaintext

<Button OnClick="HandleClick"
Color="success">
@ChildContent
</Button>
@code {
/// <summary>
/// The event to call in the parent when the confirm button is clicked.
/// </summary>
[Parameter]
public EventCallback OnClick { get; set; }
/// <summary>
/// The content to be displayed inside the button.
/// </summary>
[Parameter]
public RenderFragment? ChildContent { get; set; }
/// <summary>
/// Handles the button click event.
/// </summary>
private async Task HandleClick()
{
await OnClick.InvokeAsync();
}
}