|
|
|
@ -0,0 +1,30 @@ |
|
|
|
|
@page "/compotoast" |
|
|
|
|
|
|
|
|
|
@inject IToastService ToastService |
|
|
|
|
|
|
|
|
|
@rendermode RenderMode.InteractiveServer |
|
|
|
|
|
|
|
|
|
<h3>Toast</h3> |
|
|
|
|
<FluentDivider class="mt-1 mb-3" Role="DividerRole.Separator" /> |
|
|
|
|
<div> |
|
|
|
|
<code>FluentToast</code>s, referred to as "notifications" in the UI, are pop-up notifications that keep users informed by briefly. |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h4 class="mt-4">Default</h4> |
|
|
|
|
<FluentCard Class="mt-3" Width="auto" Height="auto"> |
|
|
|
|
<p> |
|
|
|
|
Click ont this button to open a Toast. |
|
|
|
|
</p> |
|
|
|
|
<FluentButton Appearance="Appearance.Accent" OnClick="@ShowDToast">Open</FluentButton> |
|
|
|
|
</FluentCard> |
|
|
|
|
|
|
|
|
|
@code { |
|
|
|
|
int dcounter = 1; |
|
|
|
|
void ShowDToast() |
|
|
|
|
{ |
|
|
|
|
var intent = Enum.GetValues<ToastIntent>()[Random.Shared.Next(10)]; |
|
|
|
|
var message = $"Simple Toast #{dcounter++}"; |
|
|
|
|
ToastService.ShowToast(intent, message); |
|
|
|
|
} |
|
|
|
|
} |