Override header styles for Markdown

This commit is contained in:
tsommer committed 2024-05-25 22:19:27 +02:00
1 parent 2abc9a1436
commit a6e9ef7757
2 files changed
+17

No files matched your search

@@ -36,6 +36,7 @@
else
{
<MudMarkdown Value="@textContent.Text"/>
<MudMarkdown Value="@textContent.Text" OverrideHeaderTypo="@Markdown.OverrideHeaderTypo"/>
}
}
+16
View File
@@ -0,0 +1,16 @@
namespace AIStudio.Tools;
public static class Markdown
{
public static Typo OverrideHeaderTypo(Typo arg) => arg switch
{
Typo.h1 => Typo.h4,
Typo.h2 => Typo.h5,
Typo.h3 => Typo.h6,
Typo.h4 => Typo.h6,
Typo.h5 => Typo.h6,
Typo.h6 => Typo.h6,
_ => arg
};
}