-
Notifications
You must be signed in to change notification settings - Fork 361
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
examples/Demo/Shared/Pages/Overlay/Examples/OverlayTimed.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<FluentSelect Items=@(Enum.GetValues<JustifyContent>()) | ||
OptionValue="@(c => c.ToAttributeValue())" | ||
TOption="JustifyContent" | ||
Position="SelectPosition.Below" | ||
@bind-SelectedOption="@justification" /> | ||
|
||
<FluentSelect Items=@(Enum.GetValues<Align>()) | ||
OptionValue="@(c => c.ToAttributeValue())" | ||
TOption="Align" | ||
Position="SelectPosition.Below" | ||
@bind-SelectedOption="@alignment" /> | ||
<br /> | ||
<br /> | ||
|
||
|
||
<FluentButton Appearance="Appearance.Accent" @onclick="HandleOnOpen">Show Overlay</FluentButton> | ||
|
||
<FluentOverlay @bind-Visible=@visible | ||
Opacity="0.4" | ||
Alignment="@alignment" | ||
Justification="@justification" | ||
OnClose="HandleOnClose"> | ||
<FluentProgressRing /> | ||
</FluentOverlay> | ||
|
||
@code { | ||
bool visible = false; | ||
JustifyContent justification = JustifyContent.Center; | ||
Align alignment = Align.Center; | ||
|
||
protected void HandleOnClose() | ||
{ | ||
DemoLogger.WriteLine("Overlay closed"); | ||
} | ||
|
||
protected async Task HandleOnOpen() | ||
{ | ||
visible = true; | ||
DemoLogger.WriteLine("Overlay opened"); | ||
await Task.Delay(3000); | ||
visible = false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters