Skip to content

Commit

Permalink
Enum values are part of the comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
tesar-tech committed Nov 16, 2024
1 parent 4a0b5b1 commit 25d21ac
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Documentation/Blazorise.Docs/Components/ComponentApiDocs.razor
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,18 @@
{
foreach (var property in ApiDocsForComponent.Properties.OrderBy(x=>x.Name))
{
<DocsAttributesItem @key="@property.Name" Name="@property.Name" Type="@property.Type" Default="@property.DefaultValue">
<DocsAttributesItem @key="@property.Name" Name="@property.Name" Type="@property.TypeName" Default="@property.DefaultValueString">
@((MarkupString)property.Description)

@if (property.IsBlazoriseEnum)
{
<text>Possible values: </text>
for (int i = 0; i < Enum.GetNames(property.Type).Length; i++)
{
int i1 = i;
<Span>@Enum.GetNames(property.Type)[i1]</Span>@(i < Enum.GetNames(property.Type).Length-1? ", ":"")
}
}
</DocsAttributesItem>
}
}
Expand Down

0 comments on commit 25d21ac

Please sign in to comment.