From a9588f73ba9886d3dd4e9302a7fc69f2185c2734 Mon Sep 17 00:00:00 2001 From: JovannMC Date: Tue, 27 May 2025 22:21:37 +0300 Subject: [PATCH] feat: start new dropdown ui --- src/lib/components/functional/Dropdown.svelte | 49 +++++++++++++++---- src/lib/types/dropdown.ts | 5 ++ src/lib/types/index.ts | 1 + 3 files changed, 45 insertions(+), 10 deletions(-) create mode 100644 src/lib/types/dropdown.ts diff --git a/src/lib/components/functional/Dropdown.svelte b/src/lib/components/functional/Dropdown.svelte index 102b14d..40d36d7 100644 --- a/src/lib/components/functional/Dropdown.svelte +++ b/src/lib/components/functional/Dropdown.svelte @@ -1,11 +1,13 @@
{#if open} +
- {#each options as option} - - {/each} + +
+
+
+ +
+ +
+
+ + +
+ {#each options as option} + + {/each} +
{/if}
diff --git a/src/lib/types/dropdown.ts b/src/lib/types/dropdown.ts new file mode 100644 index 0000000..1dd4b8b --- /dev/null +++ b/src/lib/types/dropdown.ts @@ -0,0 +1,5 @@ +export interface Categories { + [key: string]: { + formats: string[]; + } +} \ No newline at end of file diff --git a/src/lib/types/index.ts b/src/lib/types/index.ts index a69c1a0..7d0d8f7 100644 --- a/src/lib/types/index.ts +++ b/src/lib/types/index.ts @@ -1,3 +1,4 @@ export * from "./file.svelte"; export * from "./util"; export * from "./conversion-worker"; +export * from "./dropdown"; \ No newline at end of file