RBLNews/RBLNews.Shared/Components/Controls/BadgeWithCounter.razor
2024-09-18 17:19:01 +02:00

39 lines
758 B
Plaintext

@using RBLFeederCommon.Enums
@if (ShowCount)
{
<Button Color="ButtonColor.Info" Size="ButtonSize.Small" Clicked="@OnClicked()" Outline>@Text <small>@Count</small></Button>
}
else
{
<Button Size="ButtonSize.Small">@Text</Button>
}
@code {
[Parameter]
public RssFeedSources Source { get; set; }
[Parameter]
public string Text { get; set; }
[Parameter]
public bool ShowCount { get; set; }
[Parameter]
public int Count { get; set; }
[Parameter]
public EventCallback<RssFeedSources> OnClickedCallback { get; set; }
protected override void OnInitialized()
{
base.OnInitialized();
}
private async Task OnClicked()
{
await OnClickedCallback.InvokeAsync(Source);
}
}