enh: reintroduce model order/default models

This commit is contained in:
Timothy Jaeryang Baek
2024-11-26 00:55:58 -08:00
parent 29fac5ecca
commit 5fac25a002
12 changed files with 407 additions and 66 deletions

View File

@@ -6,7 +6,7 @@
export let show = true;
export let size = 'md';
export let className = 'bg-gray-50 dark:bg-gray-900 rounded-2xl';
export let className = 'bg-gray-50 dark:bg-gray-900 rounded-2xl';
let modalElement = null;
let mounted = false;
@@ -65,7 +65,7 @@
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
bind:this={modalElement}
class="modal fixed top-0 right-0 left-0 bottom-0 bg-black/60 w-full h-screen max-h-[100dvh] flex justify-center z-[9999] overflow-hidden overscroll-contain"
class="modal fixed top-0 right-0 left-0 bottom-0 bg-black/60 w-full h-screen max-h-[100dvh] p-3 flex justify-center z-[9999] overflow-y-auto overscroll-contain"
in:fade={{ duration: 10 }}
on:mousedown={() => {
show = false;
@@ -74,7 +74,7 @@
<div
class=" m-auto max-w-full {sizeToWidth(size)} {size !== 'full'
? 'mx-2'
: ''} shadow-3xl max-h-[100dvh] overflow-y-auto scrollbar-hidden {className}"
: ''} shadow-3xl min-h-fit scrollbar-hidden {className}"
in:flyAndScale
on:mousedown={(e) => {
e.stopPropagation();