From 14992cf5eccb3181aea393c8b8b6acf71f80258f Mon Sep 17 00:00:00 2001 From: Sipke Schoorstra Date: Thu, 28 Dec 2023 10:01:46 +0100 Subject: [PATCH] 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. --- .../UIHints/CodeEditor/CodeEditorOptions.cs | 19 ++++++++++++++++++ .../Shared/UIHints/CodeEditor/EditorHeight.cs | 20 +++++++++++++++++++ .../UIHints/CodeEditor/MultiLineOptions.cs | 10 ++++++++++ 3 files changed, 49 insertions(+) create mode 100644 src/clients/Elsa.Api.Client/Shared/UIHints/CodeEditor/CodeEditorOptions.cs create mode 100644 src/clients/Elsa.Api.Client/Shared/UIHints/CodeEditor/EditorHeight.cs create mode 100644 src/clients/Elsa.Api.Client/Shared/UIHints/CodeEditor/MultiLineOptions.cs diff --git a/src/clients/Elsa.Api.Client/Shared/UIHints/CodeEditor/CodeEditorOptions.cs b/src/clients/Elsa.Api.Client/Shared/UIHints/CodeEditor/CodeEditorOptions.cs new file mode 100644 index 000000000..bb8e10f66 --- /dev/null +++ b/src/clients/Elsa.Api.Client/Shared/UIHints/CodeEditor/CodeEditorOptions.cs @@ -0,0 +1,19 @@ +using JetBrains.Annotations; + +namespace Elsa.Api.Client.Shared.UIHints.CodeEditor; + +/// +/// Options for the code editor component. +/// +[PublicAPI] +public class CodeEditorOptions +{ + /// The height of the editor. + public EditorHeight? EditorHeight { get; set; } + + /// The language to use for syntax highlighting. + public string? Language { get; set; } + + /// Whether the editor should be in single line mode. + public bool? SingleLineMode { get; set; } +} \ No newline at end of file diff --git a/src/clients/Elsa.Api.Client/Shared/UIHints/CodeEditor/EditorHeight.cs b/src/clients/Elsa.Api.Client/Shared/UIHints/CodeEditor/EditorHeight.cs new file mode 100644 index 000000000..33a9ffd70 --- /dev/null +++ b/src/clients/Elsa.Api.Client/Shared/UIHints/CodeEditor/EditorHeight.cs @@ -0,0 +1,20 @@ +using JetBrains.Annotations; + +namespace Elsa.Api.Client.Shared.UIHints.CodeEditor; + +/// +/// Height options for the code editor component. +/// +[PublicAPI] +public enum EditorHeight +{ + /// + /// The default height. + /// + Default, + + /// + /// A large height. + /// + Large +} \ No newline at end of file diff --git a/src/clients/Elsa.Api.Client/Shared/UIHints/CodeEditor/MultiLineOptions.cs b/src/clients/Elsa.Api.Client/Shared/UIHints/CodeEditor/MultiLineOptions.cs new file mode 100644 index 000000000..e9d0ba30c --- /dev/null +++ b/src/clients/Elsa.Api.Client/Shared/UIHints/CodeEditor/MultiLineOptions.cs @@ -0,0 +1,10 @@ +using JetBrains.Annotations; + +namespace Elsa.Api.Client.Shared.UIHints.CodeEditor; + +/// +/// Options for the multi-line editor component. +/// +/// The height of the editor. +[PublicAPI] +public record MultiLineOptions(EditorHeight EditorHeight); \ No newline at end of file