-
Notifications
You must be signed in to change notification settings - Fork 101
Expand file tree
/
Copy pathApiPage.razor
More file actions
39 lines (32 loc) · 1.27 KB
/
ApiPage.razor
File metadata and controls
39 lines (32 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
@page "/api"
@using MudBlazor.Extensions
@using System.Text.RegularExpressions
@using System.Security.Cryptography.X509Certificates
@using MudExtensions.Utilities
@inject MudExtensionsDocsService DocsService
<ExamplePage Title="API">
<MudTextFieldExtended @bind-Value="_searchString" Adornment="Adornment.End" AdornmentIcon="@Icons.Material.Filled.Search" Immediate="true"
Variant="Variant.Outlined">
<AdornmentEnd>
<MudIcon Icon="@Icons.Material.Filled.Search" />
</AdornmentEnd>
</MudTextFieldExtended>
@foreach (var component in _components)
{
if (component?.Title?.Contains(_searchString ?? string.Empty, StringComparison.CurrentCultureIgnoreCase) == true)
{
<ExampleCard Title="@($"Api - {component.Title.Replace("`1", null)}")" HasExpansionPanel="true">
<DocsApiTable Type="component.Component" Component="component" />
</ExampleCard>
}
}
</ExamplePage>
@code {
private string? _searchString;
List<MudExtensionComponentInfo> _components = new();
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
_components = DocsService.GetAllComponentInfo();
}
}