From 2b888bc6440382c1708441d89fb58ed0ed1c86e6 Mon Sep 17 00:00:00 2001 From: typecad0 Date: Sat, 6 Jul 2024 09:48:53 -0700 Subject: [PATCH] scrollable output --- package-lock.json | 4 +-- src/lib/components/ui/scroll-area/index.ts | 10 ++++++ .../scroll-area/scroll-area-scrollbar.svelte | 27 ++++++++++++++++ .../ui/scroll-area/scroll-area.svelte | 32 +++++++++++++++++++ src/routes/+layout.svelte | 5 ++- 5 files changed, 75 insertions(+), 3 deletions(-) create mode 100644 src/lib/components/ui/scroll-area/index.ts create mode 100644 src/lib/components/ui/scroll-area/scroll-area-scrollbar.svelte create mode 100644 src/lib/components/ui/scroll-area/scroll-area.svelte diff --git a/package-lock.json b/package-lock.json index 2017db4..693f966 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "pcb2cnc", + "name": "kicnc", "version": "0.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "pcb2cnc", + "name": "kicnc", "version": "0.0.1", "dependencies": { "@tauri-apps/api": "^1.5.6", diff --git a/src/lib/components/ui/scroll-area/index.ts b/src/lib/components/ui/scroll-area/index.ts new file mode 100644 index 0000000..e86a25b --- /dev/null +++ b/src/lib/components/ui/scroll-area/index.ts @@ -0,0 +1,10 @@ +import Scrollbar from "./scroll-area-scrollbar.svelte"; +import Root from "./scroll-area.svelte"; + +export { + Root, + Scrollbar, + //, + Root as ScrollArea, + Scrollbar as ScrollAreaScrollbar, +}; diff --git a/src/lib/components/ui/scroll-area/scroll-area-scrollbar.svelte b/src/lib/components/ui/scroll-area/scroll-area-scrollbar.svelte new file mode 100644 index 0000000..a97f3bb --- /dev/null +++ b/src/lib/components/ui/scroll-area/scroll-area-scrollbar.svelte @@ -0,0 +1,27 @@ + + + + + + diff --git a/src/lib/components/ui/scroll-area/scroll-area.svelte b/src/lib/components/ui/scroll-area/scroll-area.svelte new file mode 100644 index 0000000..e8e368c --- /dev/null +++ b/src/lib/components/ui/scroll-area/scroll-area.svelte @@ -0,0 +1,32 @@ + + + + + + + + + {#if orientation === "vertical" || orientation === "both"} + + {/if} + {#if orientation === "horizontal" || orientation === "both"} + + {/if} + + diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index adc40a1..9080a4e 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -8,7 +8,8 @@ import { CircuitBoard } from 'lucide-svelte'; import { ModeWatcher } from 'mode-watcher'; import { platform } from '@tauri-apps/api/os'; - + import { ScrollArea } from "$lib/components/ui/scroll-area/index.js"; + import '../app.css'; const sidebarNavItems = [ @@ -274,6 +275,7 @@ + Output @@ -283,6 +285,7 @@ +