mirror of
https://github.com/radzenhq/radzen-blazor.git
synced 2026-07-08 18:16:08 +00:00
15 lines
887 B
Plaintext
15 lines
887 B
Plaintext
@inject NotificationService NotificationService
|
|
|
|
<RadzenStack Orientation="Orientation.Vertical" AlignItems="AlignItems.Center" JustifyContent="JustifyContent.Center" Gap="2rem" Wrap="FlexWrap.Wrap" class="rz-p-12">
|
|
<RadzenStack Orientation="Orientation.Horizontal" AlignItems="AlignItems.Center" Gap="1rem" Wrap="FlexWrap.Wrap">
|
|
<RadzenToggleButton ButtonStyle="ButtonStyle.Success" ToggleButtonStyle="ButtonStyle.Danger" ToggleShade="Shade.Default" Click=@(args => OnClick("Primary button"))
|
|
Text="Toggle Severity" InputAttributes="@(new Dictionary<string,object>(){ { "aria-label", "Button" }})" />
|
|
</RadzenStack>
|
|
</RadzenStack>
|
|
|
|
@code {
|
|
private void OnClick(string text)
|
|
{
|
|
NotificationService.Notify(new NotificationMessage { Severity = NotificationSeverity.Info, Summary = "ToggleButton Clicked", Detail = text });
|
|
}
|
|
} |