-
Notifications
You must be signed in to change notification settings - Fork 389
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Overlay] Add FullScreenInteractiveExceptElementId (#2580)
- Loading branch information
Showing
24 changed files
with
390 additions
and
79 deletions.
There are no files selected for viewing
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
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
63 changes: 63 additions & 0 deletions
63
examples/Demo/Shared/Pages/Overlay/Examples/OverlayInteractive.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,63 @@ | ||
|
||
<FluentStack> | ||
<FluentSwitch @bind-Value="@interactive" Label="Interactive" /> | ||
<FluentSwitch @bind-Value="@interactiveExceptId" Label="Exception Zone (my-zone)" Disabled="@(!interactive)" /> | ||
<FluentSwitch @bind-Value="@fullScreen" Label="Full screen" /> | ||
</FluentStack> | ||
|
||
<FluentButton Appearance="Appearance.Accent" | ||
Style="margin: 24px 0px;" | ||
@onclick="() => visible = !visible"> | ||
Show Overlay | ||
</FluentButton> | ||
|
||
<FluentStack VerticalAlignment="VerticalAlignment.Center"> | ||
<FluentButton OnClick="@(e => counter++)">Increment</FluentButton> | ||
<FluentLabel>Counter: @counter</FluentLabel> | ||
</FluentStack> | ||
|
||
<FluentOverlay @bind-Visible=@visible | ||
Opacity="0.4" | ||
BackgroundColor="#e8f48c" | ||
FullScreen="@fullScreen" | ||
Interactive="@interactive" | ||
InteractiveExceptId="@(interactiveExceptId ? "my-zone" : null)" | ||
OnClose="HandleOnClose" | ||
PreventScroll=true> | ||
@if (interactive) | ||
{ | ||
<div id="my-zone"> | ||
<p>Non-interactive zone</p> | ||
<FluentProgressRing /> | ||
</div> | ||
} | ||
else | ||
{ | ||
<FluentProgressRing /> | ||
} | ||
</FluentOverlay> | ||
|
||
<style> | ||
#my-zone { | ||
background-color: white; | ||
width: 200px; | ||
height: 160px; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
</style> | ||
|
||
@code { | ||
bool visible = false; | ||
bool interactive = true; | ||
bool interactiveExceptId = true; | ||
bool fullScreen = true; | ||
int counter = 0; | ||
|
||
protected void HandleOnClose() | ||
{ | ||
DemoLogger.WriteLine("Overlay closed"); | ||
} | ||
} |
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
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
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
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
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
Oops, something went wrong.