Skip to content

Commit 7365c14

Browse files
committed
FluentToast wip
1 parent 456ea8d commit 7365c14

34 files changed

+401
-645
lines changed

examples/FluentUI.Demo.Shared/Microsoft.Fast.Components.FluentUI.xml

Lines changed: 26 additions & 71 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
@implements IToastComponent
2-
@inherits FluentToast
1+
@implements IToastContentComponent
2+
33
<div class="text-white p-4 bg-secondary rounded">
44
<h3>@Title</h3>
55
<h5 class="mb-0">@ToastParam</h5>
@@ -13,12 +13,18 @@
1313
[CascadingParameter]
1414
private FluentToast Toast { get; set; } = default!;
1515

16+
[Parameter]
17+
public ToastIntent Intent { get; set; }
1618

1719
[Parameter]
18-
public string? ToastParam { get; set; }
20+
public string? Title { get; set; }
21+
22+
[Parameter]
23+
public ToastEndContentType EndContentType { get; set; }
1924

20-
protected override void OnInitialized()
21-
{
22-
Settings = Toast.Settings;
23-
}
25+
[Parameter]
26+
public ToastSettings Settings { get; set; } = default!;
27+
28+
[Parameter]
29+
public string? ToastParam { get; set; }
2430
}

examples/FluentUI.Demo.Shared/Pages/Toast/Examples/ToastClearList.razor

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55

66
<FluentButton Appearance=Appearance.Neutral @onclick="ClearAllPreserveQueue">Clear all, preserve queue</FluentButton>
77

8-
<FluentButton Appearance=Appearance.Neutral @onclick="ClearCustom">Clear custom </FluentButton>
9-
108
<FluentButton Appearance=Appearance.Neutral @onclick="ClearIntent">Clear specific intent</FluentButton>
119

1210
<FluentButton Appearance=Appearance.Neutral @onclick="ClearSuccess">
@@ -67,11 +65,8 @@
6765
private void ClearAllPreserveQueue()
6866
=> ToastManager.ClearAll(false);
6967

70-
private void ClearCustom()
71-
=> ToastManager.ClearCustomToasts();
72-
7368
private void ClearIntent()
74-
=> ToastManager.ClearToasts(ToastIntent.Warning);
69+
=> ToastManager.ClearIntent(ToastIntent.Warning);
7570

7671
private void ClearSuccess()
7772
=> ToastManager.ClearSuccessToasts();

examples/FluentUI.Demo.Shared/Pages/Toast/Examples/ToastConfirmationToastCreate.razor

Lines changed: 0 additions & 75 deletions
This file was deleted.

0 commit comments

Comments
 (0)