Skip to content

Commit

Permalink
Move declaration of nonnullableType variable to @code
Browse files Browse the repository at this point in the history
  • Loading branch information
iwis committed Nov 3, 2021
1 parent 9451f2e commit 0b3f40c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/MudBlazor.Docs/Components/DocsTypeInfo.razor
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
@{ Type nonnullableType = Nullable.GetUnderlyingType(Type) ?? Type; }

@if (nonnullableType.IsEnum)
@if (NonnullableType.IsEnum)
{
<MudTooltip>
<ChildContent>@Type.ConvertToCSharpSource()</ChildContent>
<TooltipContent>
enumeration type
<MudText Align="Align.Left" Typo="Typo.body2">
@foreach (var name in Enum.GetNames(nonnullableType))
@foreach (var name in Enum.GetNames(NonnullableType))
{
@(nonnullableType.Name + "." + name)<br />
@(NonnullableType.Name + "." + name)<br />
}
</MudText>
</TooltipContent>
Expand All @@ -22,4 +20,6 @@ else

@code {
[Parameter] public Type Type { get; set; }

private Type NonnullableType => Nullable.GetUnderlyingType(Type) ?? Type;
}

0 comments on commit 0b3f40c

Please sign in to comment.