Skip to content

Commit

Permalink
Added Nullable example
Browse files Browse the repository at this point in the history
  • Loading branch information
EdCharbeneau committed May 21, 2021
1 parent dd02793 commit f82dbd5
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions TestComponents/Pages/NullableFlag.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
@page "/nullable"
@if (IsSmall.HasValue)
{
if (IsSmall.Value)
{
<h1>Small</h1>
}
else
{
<h1>Large</h1>
}
} else
{
<span>Waiting for JavaScript interop...</span>
}

<MediaQuery Media="@Breakpoints.SmallDown" MatchesChanged="@(matched => IsSmall = matched)"></MediaQuery>

@code {
bool? IsSmall = null;
}

0 comments on commit f82dbd5

Please sign in to comment.