This commit is contained in:
Timothy Jaeryang Baek committed 2026-03-15 22:25:22 -05:00
1 parent e53152123f
commit 38cc6e4762
15 files changed
+392 -473

No files matched your search

+18 -21
View File
@@ -1,13 +1,9 @@
<script lang="ts">
import { DropdownMenu } from 'bits-ui';
import { createEventDispatcher, getContext, onMount } from 'svelte';
import { getContext } from 'svelte';
import { showSettings, mobile, showSidebar, user } from '$lib/stores';
import { fade, slide } from 'svelte/transition';
import PencilSquare from '../icons/PencilSquare.svelte';
import ChatBubbleOval from '../icons/ChatBubbleOval.svelte';
import Dropdown from '$lib/components/common/Dropdown.svelte';
import Sparkles from '../icons/Sparkles.svelte';
import ChatBubbleOval from '../icons/ChatBubbleOval.svelte';
const i18n = getContext('i18n');
@@ -20,18 +16,19 @@
export let onChange = () => {};
</script>
<DropdownMenu.Root bind:open={show} onOpenChange={onChange}>
<DropdownMenu.Trigger>
<slot />
</DropdownMenu.Trigger>
<Dropdown
bind:show
align="end"
sideOffset={8}
onOpenChange={(state) => {
onChange(state);
}}
>
<slot />
<slot name="content">
<DropdownMenu.Content
class="w-full {className} text-sm rounded-xl p-1 z-50 bg-white dark:bg-gray-850 dark:text-white shadow-lg font-primary"
sideOffset={8}
side="bottom"
align="end"
transition={(e) => fade(e, { duration: 100 })}
<div slot="content">
<div
class="min-w-[170px] text-sm rounded-xl p-1 z-50 bg-white dark:bg-gray-850 dark:text-white shadow-lg font-primary"
>
<button
class="flex rounded-md py-1.5 px-3 w-full hover:bg-gray-50 dark:hover:bg-gray-800 transition"
@@ -58,6 +55,6 @@
</div>
<div class=" self-center truncate">{$i18n.t('Chat')}</div>
</button>
</DropdownMenu.Content>
</slot>
</DropdownMenu.Root>
</div>
</div>
</Dropdown>