DevPeople.Blazor.SweetAlerts 1.0.1

dotnet add package DevPeople.Blazor.SweetAlerts --version 1.0.1
NuGet\Install-Package DevPeople.Blazor.SweetAlerts -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DevPeople.Blazor.SweetAlerts" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DevPeople.Blazor.SweetAlerts --version 1.0.1
#r "nuget: DevPeople.Blazor.SweetAlerts, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install DevPeople.Blazor.SweetAlerts as a Cake Addin
#addin nuget:?package=DevPeople.Blazor.SweetAlerts&version=1.0.1

// Install DevPeople.Blazor.SweetAlerts as a Cake Tool
#tool nuget:?package=DevPeople.Blazor.SweetAlerts&version=1.0.1

This is a very basic sweet alert version with limited functionality. In next version it will be fully working as sweetalertjs. Please email me at syedadeel2@gmail.com if you found any bugs or any feature you think might help devs.

This library has a static class so you do not need to use @inject.

@using DevPeople.Blazor.SweetAlerts

<h1>My App</h1>

@functions{

 async Task BasicAlert()
    {
        await SweetAlert.ShowAlert(new AlertModel
        {
            Text = "This is basic alert",
            Title = "Basic Alert",
            Icon = "info" // you can change it according to your needs "error", "success", "warning", "info"

        });
    }

    async Task BasicAlertWithCancelButton()
    {
        var alert = new AlertModel
        {
            Text = "This is basic alert",
            Title = "Basic Alert",
            Icon = "info" // you can change it according to your needs "error", "success", "warning", "info"

        };

        alert.AddCancelButton();

        // can you also change the text of the cancel button
        // alert.AddCancelButton("Close It");

        await SweetAlert.ShowAlert(alert);
    }

 async Task BasicAlertWithCustomButton()
    {
        var alert = new AlertModel
        {
            Text = "This is basic alert",
            Title = "Basic Alert",
            Icon = "info" // you can change it according to your needs "error", "success", "warning", "info"

        };

        alert.AddCancelButton();

        alert.AddCustomButton("RollIt", new SweetAlertButton
        {
            Text = "Roll it!",
            Value = "RollItClicked",
            Order = 2,
            CloseModel = true,
            Visible = true
        });


        await SweetAlert.ShowAlert(alert);
    }

    // There are 2 ways to register with button click event.
    // 1. use the below SweetAlert_ButtonClicked static method with [JSInvokable] (do not change the name of the method)
    // 2. use SweetAlert.ButtonClicked Event handler. Note this is static event don't forget to unsubsribe
    [JSInvokable]
    public static void SweetAlert_ButtonClicked(string buttonValue)
    {

        Console.WriteLine(buttonValue);

    }

}
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 1,122 9/16/2018