about summary refs log tree commit diff
path: root/MatrixRoomUtils.Web/Shared/SimpleComponents/LinkButton.razor
diff options
context:
space:
mode:
Diffstat (limited to 'MatrixRoomUtils.Web/Shared/SimpleComponents/LinkButton.razor')
-rw-r--r--MatrixRoomUtils.Web/Shared/SimpleComponents/LinkButton.razor14
1 files changed, 9 insertions, 5 deletions
diff --git a/MatrixRoomUtils.Web/Shared/SimpleComponents/LinkButton.razor b/MatrixRoomUtils.Web/Shared/SimpleComponents/LinkButton.razor

index 09b5c32..b800989 100644 --- a/MatrixRoomUtils.Web/Shared/SimpleComponents/LinkButton.razor +++ b/MatrixRoomUtils.Web/Shared/SimpleComponents/LinkButton.razor
@@ -1,16 +1,20 @@ -<a href="@href" class="btn btn-primary" style="background-color: @(Color ?? "#1b6ec2");"> +<a href="@href" class="btn btn-primary" @onclick="@(() => OnClick?.Invoke())" + style="background-color: @(Color ?? "#1b6ec2");"> @ChildContent </a> @code { - + [Parameter] - public string href { get; set; } - + public string? href { get; set; } + [Parameter] public RenderFragment ChildContent { get; set; } [Parameter] public string? Color { get; set; } -} \ No newline at end of file + [Parameter] + public Func<Task>? OnClick { get; set; } + +}
OSZAR »