@@ -54,6 +57,8 @@
{
private ToastParameters _toastParameters = default!;
+ private string customIconHtml => $"
";
+
protected override void OnInitialized()
{
_toastParameters = new ToastParameters()
diff --git a/samples/BlazorWebAssembly/wwwroot/blazoredIcon.svg b/samples/BlazorWebAssembly/wwwroot/blazoredIcon.svg
new file mode 100644
index 0000000..986e9bc
--- /dev/null
+++ b/samples/BlazorWebAssembly/wwwroot/blazoredIcon.svg
@@ -0,0 +1,852 @@
+
+
diff --git a/src/Blazored.Toast/BlazoredToast.razor b/src/Blazored.Toast/BlazoredToast.razor
index 906ab0f..b111d58 100644
--- a/src/Blazored.Toast/BlazoredToast.razor
+++ b/src/Blazored.Toast/BlazoredToast.razor
@@ -64,6 +64,9 @@ else
case IconType.Material:
@Settings.Icon
break;
+ case IconType.Custom:
+ @((MarkupString)Settings.Icon!);
+ break;
}
}
diff --git a/src/Blazored.Toast/BlazoredToast.razor.cs b/src/Blazored.Toast/BlazoredToast.razor.cs
index 771aa00..b43de20 100644
--- a/src/Blazored.Toast/BlazoredToast.razor.cs
+++ b/src/Blazored.Toast/BlazoredToast.razor.cs
@@ -83,6 +83,7 @@ private bool ShowIconDiv()
IconType.Blazored => true,
IconType.FontAwesome => !string.IsNullOrWhiteSpace(Settings.Icon),
IconType.Material => !string.IsNullOrWhiteSpace(Settings.Icon),
+ IconType.Custom => !string.IsNullOrWhiteSpace(Settings.Icon),
_ => false
};