mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-28 04:14:23 +00:00
Override header styles for Markdown
This commit is contained in:
2 files changed
+17
No files matched your search
@@ -36,6 +36,7 @@
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
<MudMarkdown Value="@textContent.Text"/>
|
<MudMarkdown Value="@textContent.Text"/>
|
||||||
|
<MudMarkdown Value="@textContent.Text" OverrideHeaderTypo="@Markdown.OverrideHeaderTypo"/>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in new issue
Block a user