From 030e76936b92279cfa82b2c94dbae422766cb6cb Mon Sep 17 00:00:00 2001 From: typicalninja <65993466+typicalninja493@users.noreply.github.com> Date: Tue, 12 Sep 2023 22:36:08 +0530 Subject: [PATCH] Option view and add support --- src/app.html | 2 +- src/components/commandOptions.svelte | 211 ++++++++++++++++++++++++--- src/components/icons/ChevronD.svelte | 10 ++ src/components/icons/Minus.svelte | 10 ++ src/lib/constants.ts | 28 +++- src/lib/helpers.ts | 44 ++++++ src/routes/editor/+page.svelte | 45 +++++- tailwind.config.js | 1 + 8 files changed, 328 insertions(+), 23 deletions(-) create mode 100644 src/components/icons/ChevronD.svelte create mode 100644 src/components/icons/Minus.svelte create mode 100644 src/lib/helpers.ts diff --git a/src/app.html b/src/app.html index 1fc16b4..a899f02 100644 --- a/src/app.html +++ b/src/app.html @@ -1,5 +1,5 @@ - + diff --git a/src/components/commandOptions.svelte b/src/components/commandOptions.svelte index a069201..7849086 100644 --- a/src/components/commandOptions.svelte +++ b/src/components/commandOptions.svelte @@ -1,27 +1,200 @@
-
- Options - -
- {#each options as option} -
- {option.type} -
- {/each} -
\ No newline at end of file +
+ Options + +
+ {#each options as option (option.itemId)} +
+
+ {option.name} {OptionTypeToName(option.type)} option +
+ + +
+
+ {#if option.open} +
+ + + + +