mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-03-22 22:11:36 +00:00
18 lines
489 B
C#
18 lines
489 B
C#
|
|
using Microsoft.AspNetCore.Components;
|
||
|
|
|
||
|
|
namespace AIStudio.Chat;
|
||
|
|
|
||
|
|
public partial class MathJaxBlock
|
||
|
|
{
|
||
|
|
[Parameter]
|
||
|
|
public string Value { get; init; } = string.Empty;
|
||
|
|
|
||
|
|
[Parameter]
|
||
|
|
public string Class { get; init; } = string.Empty;
|
||
|
|
|
||
|
|
private string RootClass => string.IsNullOrWhiteSpace(this.Class)
|
||
|
|
? "chat-mathjax-block"
|
||
|
|
: $"chat-mathjax-block {this.Class}";
|
||
|
|
|
||
|
|
private string MathText => $"$${Environment.NewLine}{this.Value}{Environment.NewLine}$$";
|
||
|
|
}
|