diff --git a/BlazorFluentUI/Components/Layout/NavMenu.razor b/BlazorFluentUI/Components/Layout/NavMenu.razor index 751d7c1..ce91d95 100644 --- a/BlazorFluentUI/Components/Layout/NavMenu.razor +++ b/BlazorFluentUI/Components/Layout/NavMenu.razor @@ -70,6 +70,7 @@ MessageBar MessageBox Overlay + Toast diff --git a/BlazorFluentUI/Components/Pages/Components/CompoOverlay.razor b/BlazorFluentUI/Components/Pages/Components/CompoOverlay.razor index 1cd4aa2..959c780 100644 --- a/BlazorFluentUI/Components/Pages/Components/CompoOverlay.razor +++ b/BlazorFluentUI/Components/Pages/Components/CompoOverlay.razor @@ -1,10 +1,8 @@ @page "/compooverlay" -@inject IDialogService DialogService; - @rendermode RenderMode.InteractiveServer -

MessageBox

+

Overlay

FluentOverlays are used to templorarily overlay screen content to focus a dialog, progress or other infomtion/interaction. diff --git a/BlazorFluentUI/Components/Pages/Components/CompoToast.razor b/BlazorFluentUI/Components/Pages/Components/CompoToast.razor new file mode 100644 index 0000000..8fb307b --- /dev/null +++ b/BlazorFluentUI/Components/Pages/Components/CompoToast.razor @@ -0,0 +1,30 @@ +@page "/compotoast" + +@inject IToastService ToastService + +@rendermode RenderMode.InteractiveServer + +

Toast

+ +
+ FluentToasts, referred to as "notifications" in the UI, are pop-up notifications that keep users informed by briefly. +
+ + +

Default

+ +

+ Click ont this button to open a Toast. +

+ Open +
+ +@code { + int dcounter = 1; + void ShowDToast() + { + var intent = Enum.GetValues()[Random.Shared.Next(10)]; + var message = $"Simple Toast #{dcounter++}"; + ToastService.ShowToast(intent, message); + } +}