Add CodeEditorOptions, EditorHeight, and MultiLineOptions classes

This commit introduces three new classes to the CodeEditor namespace. CodeEditorOptions provides various configuration options for the code editor while EditorHeight defines available height options. MultiLineOptions is specifically built for managing multi-line editor settings.
This commit is contained in:
Sipke Schoorstra 2023-12-28 10:01:46 +01:00
parent a41a542856
commit 14992cf5ec
3 changed files with 49 additions and 0 deletions

View file

@ -0,0 +1,19 @@
using JetBrains.Annotations;
namespace Elsa.Api.Client.Shared.UIHints.CodeEditor;
/// <summary>
/// Options for the code editor component.
/// </summary>
[PublicAPI]
public class CodeEditorOptions
{
/// <summary>The height of the editor.</summary>
public EditorHeight? EditorHeight { get; set; }
/// <summary>The language to use for syntax highlighting.</summary>
public string? Language { get; set; }
/// <summary>Whether the editor should be in single line mode.</summary>
public bool? SingleLineMode { get; set; }
}

View file

@ -0,0 +1,20 @@
using JetBrains.Annotations;
namespace Elsa.Api.Client.Shared.UIHints.CodeEditor;
/// <summary>
/// Height options for the code editor component.
/// </summary>
[PublicAPI]
public enum EditorHeight
{
/// <summary>
/// The default height.
/// </summary>
Default,
/// <summary>
/// A large height.
/// </summary>
Large
}

View file

@ -0,0 +1,10 @@
using JetBrains.Annotations;
namespace Elsa.Api.Client.Shared.UIHints.CodeEditor;
/// <summary>
/// Options for the multi-line editor component.
/// </summary>
/// <param name="EditorHeight">The height of the editor.</param>
[PublicAPI]
public record MultiLineOptions(EditorHeight EditorHeight);