From 2643364e1fc6211178bbe8e7050b1db36b159edc Mon Sep 17 00:00:00 2001 From: dyatlov-a Date: Sun, 6 Oct 2024 21:37:58 +0300 Subject: [PATCH] Added NotificationBar component to story book --- .../Features/NotificationBar.stories.razor | 25 +++++++++++++++++++ src/Inc.TeamAssistant.Stories/_Imports.razor | 3 ++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 src/Inc.TeamAssistant.Stories/Features/NotificationBar.stories.razor diff --git a/src/Inc.TeamAssistant.Stories/Features/NotificationBar.stories.razor b/src/Inc.TeamAssistant.Stories/Features/NotificationBar.stories.razor new file mode 100644 index 00000000..a4de60a6 --- /dev/null +++ b/src/Inc.TeamAssistant.Stories/Features/NotificationBar.stories.razor @@ -0,0 +1,25 @@ +@attribute [Stories("Features/NotificationBar")] + +@inject IServiceProvider ServiceProvider + + + + + + + +@code { + protected override void OnAfterRender(bool firstRender) + { + if (firstRender) + { + var notificationsService = ServiceProvider.GetRequiredService(); + + notificationsService.Publish(Notification.Info("Info message.")); + notificationsService.Publish(Notification.Warning("Warning message.")); + notificationsService.Publish(Notification.Error("Error message.")); + } + } +} \ No newline at end of file diff --git a/src/Inc.TeamAssistant.Stories/_Imports.razor b/src/Inc.TeamAssistant.Stories/_Imports.razor index 6e61b618..7066040f 100644 --- a/src/Inc.TeamAssistant.Stories/_Imports.razor +++ b/src/Inc.TeamAssistant.Stories/_Imports.razor @@ -13,4 +13,5 @@ @using Inc.TeamAssistant.Stories.Components @using Inc.TeamAssistant.WebUI.Components -@using Inc.TeamAssistant.WebUI.Services.ClientCore \ No newline at end of file +@using Inc.TeamAssistant.WebUI.Services.ClientCore +@using Inc.TeamAssistant.WebUI.Features.Notifications \ No newline at end of file