Skip to content

Commit

Permalink
Don't show enum values of enum has more than 30 values
Browse files Browse the repository at this point in the history
  • Loading branch information
stsrki committed Dec 9, 2024
1 parent e474293 commit 564d56f
Showing 1 changed file with 14 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,26 @@
{
<DocsAttributesItem @key="@property.Name" Name="@property.Name" Type="@property.TypeName"
Default="@property.DefaultValueString">
<Paragraph Margin="@(property.IsBlazoriseEnum ? null : Margin.Is0.FromBottom)">
<Paragraph Margin="Margin.Is0.FromBottom">
@((MarkupString)property.Summary)
</Paragraph>

@if (property.IsBlazoriseEnum)
@if ( property.IsBlazoriseEnum )
{
var enumNames = Enum.GetNames(property.Type);

<Paragraph Margin="Margin.Is0.FromBottom">
<Text>Possible values:</Text>
@for ( var i = 0; i < enumNames.Length; i++ )
{
int enumIndex = i;
<Code>@enumNames[enumIndex]</Code>
@(i < @enumNames.Length - 1 ? ", " : "")
}
</Paragraph>
@if ( enumNames.Count() <= 30 )
{
<Paragraph Margin="Margin.Is3.FromTop.Is0.FromBottom">
<Text>Possible values:</Text>
@for ( var i = 0; i < enumNames.Length; i++ )
{
int enumIndex = i;
<Code>@enumNames[enumIndex]</Code>
@(i < @enumNames.Length - 1 ? ", " : "")
}
</Paragraph>
}
}
<ComponentApiDocsRemarks Value="@property.Remarks" />
</DocsAttributesItem>
Expand Down

0 comments on commit 564d56f

Please sign in to comment.