Skip to content

Commit

Permalink
remove obsolete component
Browse files Browse the repository at this point in the history
  • Loading branch information
msynk committed Jan 6, 2025
1 parent 79d141d commit e31b026
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 113 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
namespace Bit.BlazorUI.Demo.Client.Core.Services;

public partial class MessageBoxService
{
[AutoInject] private IPubSubService pubSubService = default!;
[AutoInject] private BitModalService modalService { get; set; } = default!;

public async Task Show(string message, string title = "")
{
TaskCompletionSource<object?> tcs = new();
pubSubService.Publish(PubSubMessages.SHOW_MESSAGE, (message, title, tcs));
await tcs.Task;
BitModalReference modalRef = default!;
Dictionary<string, object> parameters = new()
{
{ nameof(BitMessageBox.Title), title },
{ nameof(BitMessageBox.Body), message },
{ nameof(BitMessageBox.OnClose), EventCallback.Factory.Create(this, () => modalRef.Close()) }
};
modalRef = await modalService.Show<BitMessageBox>(parameters);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@
</BitLayout>
</BitAppShell>

<MessageBox />
<BitModalContainer />

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit e31b026

Please sign in to comment.