https://github.com/brianlparker/blazortoast
https://github.com/brianlparker/blazortoast
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/brianlparker/blazortoast
- Owner: BrianLParker
- Created: 2020-12-11T16:15:34.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-11T18:25:40.000Z (over 5 years ago)
- Last Synced: 2025-12-27T03:45:22.489Z (6 months ago)
- Language: C#
- Size: 245 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# BlazorToast
Enable Bootstraps toast popups in blazor
`Startup.cs`
```
using OrakTech.BlazorToast;
...
services.AddToastServices();
```
`Program.cs`
```
using OrakTech.BlazorToast;
...
builder.Services.AddToastServices();
```
`_Imports.razor`
```
@using OrakTech.BlazorToast
@using OrakTech.BlazorToast.Models
@using OrakTech.BlazorToast.Views.Components
@using OrakTech.BlazorToast.Services.Toasts
```
### Example Usage
```
Pop
@code {
[Inject]
public IToastService toaster { get; set; }
void Launch()
{
toaster.AddToast(toast);
}
ToastModel toast => new ToastModel
{
Title = "Demonstration",
Content = "Hello",
IconColor = "red"
};
}
```