fix: large format dropdown

This commit is contained in:
Maya 2025-07-28 21:24:42 +03:00
parent 77914de25d
commit 8d1d9647f0
No known key found for this signature in database
1 changed files with 2 additions and 5 deletions

View File

@ -23,7 +23,6 @@
disabled, disabled,
}: Props = $props(); }: Props = $props();
let open = $state(false); let open = $state(false);
let hover = $state(false);
let dropdown = $state<HTMLDivElement>(); let dropdown = $state<HTMLDivElement>();
let currentCategory = $state<string | null>(); let currentCategory = $state<string | null>();
let searchQuery = $state(""); let searchQuery = $state("");
@ -254,8 +253,6 @@
class="relative flex items-center justify-center w-full font-display px-3 py-3.5 bg-button rounded-full overflow-hidden cursor-pointer focus:!outline-none class="relative flex items-center justify-center w-full font-display px-3 py-3.5 bg-button rounded-full overflow-hidden cursor-pointer focus:!outline-none
{disabled ? 'opacity-50 cursor-auto' : 'cursor-pointer'}" {disabled ? 'opacity-50 cursor-auto' : 'cursor-pointer'}"
onclick={() => clickDropdown()} onclick={() => clickDropdown()}
onmouseenter={() => (hover = true)}
onmouseleave={() => (hover = false)}
{disabled} {disabled}
> >
<!-- <p>{selected}</p> --> <!-- <p>{selected}</p> -->
@ -272,7 +269,7 @@
duration, duration,
easing: quintOut, easing: quintOut,
}} }}
class="col-start-1 row-start-1 text-center font-body font-medium truncate text-ellipsis max-w-[8rem] mx-auto" class="col-start-1 row-start-1 text-center font-body font-medium truncate max-w-[8rem]"
> >
{selected} {selected}
</p> </p>
@ -280,7 +277,7 @@
{#if currentCategory} {#if currentCategory}
{#each categories[currentCategory].formats as option} {#each categories[currentCategory].formats as option}
<p <p
class="col-start-1 row-start-1 invisible pointer-events-none truncate text-ellipsis max-w-[8rem] mx-auto" class="col-start-1 row-start-1 invisible pointer-events-none truncate max-w-[4rem]"
> >
{option} {option}
</p> </p>