Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions examples/Demo/Shared/Components/ApiDocumentation.razor
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@using Microsoft.Fast.Components.FluentUI;

<div>
<h2 id="@_id">@_displayName</h2>
<h3 id="@_id">@_displayName</h3>


@if (Component.BaseType != null && Component.BaseType != typeof(FluentComponentBase) && Component.BaseType.Name.StartsWith("Fluent"))
Expand All @@ -24,7 +24,7 @@
@if (this.Properties.Any())
{
string header = Properties.Any(x => x.IsParameter) ? "Parameters" : "Properties";
<h3 id="@(_id + "_properties")">@header</h3>
<h4 id="@(_id + "_properties")">@header</h4>
<FluentDataGrid Class="docgrid" Items="@this.Properties.AsQueryable()" GridTemplateColumns="1fr 1fr 0.5fr 1.5fr">
<TemplateColumn Title="Name"><code>@context.Name</code></TemplateColumn>
<TemplateColumn Title="Type">
Expand Down Expand Up @@ -59,7 +59,7 @@

@if (this.Events.Any())
{
<h3 id="@(_id)_callbacks">EventCallbacks</h3>
<h4 id="@(_id)_callbacks">EventCallbacks</h4>
<FluentDataGrid Class="docgrid" Items="@this.Events.AsQueryable()" GridTemplateColumns="1fr 1fr 1fr">
<TemplateColumn Title="Name"><code>@context.Name</code></TemplateColumn>
<PropertyColumn Property="@(c => c.Type)" />
Expand All @@ -73,7 +73,7 @@

@if (this.Methods.Any())
{
<h3 id="@(_id)_methods">Methods</h3>
<h4 id="@(_id)_methods">Methods</h4>
<FluentDataGrid Class="docgrid" Items="@this.Methods.AsQueryable()" GridTemplateColumns="1fr 1fr 1fr 1fr">
<TemplateColumn Title="Name"><code>@context.Name</code></TemplateColumn>
<TemplateColumn Title="Parameters">
Expand Down
45 changes: 24 additions & 21 deletions examples/Demo/Shared/Components/DemoSection.razor
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,20 @@
@foreach (KeyValuePair<string, string> pair in _tabPanelsContent)
{
string tab = Path.GetExtension(pair.Key);
string tabname = GetDisplayName(tab);

string id = string.Empty;

if (pair.Key.StartsWith(Component.Name))
{
id = "tab-" + @GetDisplayName(tab).Replace("#", "").Replace("/", "").ToLower() + "-" + @ariaid;
id = "tab-" + tabname + "-" + @ariaid;
}
else
{
string tabName = Path.GetFileNameWithoutExtension(pair.Key);
id = "tab-" + tabName.Replace("#", "").Replace("/", "").ToLower() + "-" + @ariaid;
tabname = Path.GetFileNameWithoutExtension(pair.Key);
id = "tab-" + tabname.Replace("#", "").Replace("/", "").ToLower() + "-" + @ariaid;
}
<FluentTab Id="@id" Label="@GetDisplayName(tab)" fixed>
<FluentTab Id="@id" Label="@tabname" fixed>
<Content>
<CodeSnippet Language="@TabLanguageClass(tab)">@pair.Value</CodeSnippet>
</Content>
Expand All @@ -63,25 +64,27 @@
{
<div class="demo-section-downloads">
<FluentSpacer />
Download:&nbsp;
@foreach (KeyValuePair<string, string> pair in _tabPanelsContent)
{
string source = pair.Key;
<FluentAnchor Style="width: 85px; text-overflow: ellipsis" Download="@source" Href="@($"_content/FluentUI.Demo.Shared/sources/{source}.txt")" Appearance="Appearance.Neutral">
@if (source.StartsWith(Component.Name))
{
@GetDisplayName(source.Substring(source.LastIndexOf('.')))
}
else
<div style="display: flex; align-items: center;">
Download:&nbsp;
@foreach (KeyValuePair<string, string> pair in _tabPanelsContent)
{
string source = pair.Key;
<FluentAnchor Style="min-width: 85px; text-overflow: ellipsis" Download="@source" Href="@($"_content/FluentUI.Demo.Shared/sources/{source}.txt")" Appearance="Appearance.Neutral">
@if (source.StartsWith(Component.Name))
{
@GetDisplayName(source.Substring(source.LastIndexOf('.')))
}
else
{
@source.Substring(0, source.LastIndexOf('.'))
}
</FluentAnchor>

@if (source != _tabPanelsContent.Last().Key)
{
@source
<span>&nbsp;</span>
}
</FluentAnchor>

@if (source != _tabPanelsContent.Last().Key)
{
<span>&nbsp;</span>
}
}
</div>
</div>
}
Loading