refac: pinned collapsible styling

This commit is contained in:
Timothy J. Baek
2024-10-14 21:15:36 -07:00
parent 2afc5f3339
commit 4c7651c113
2 changed files with 55 additions and 51 deletions

View File

@@ -7,12 +7,13 @@
export let open = false;
export let className = '';
export let buttonClassName = 'w-fit';
export let title = null;
</script>
<div class={className}>
{#if title !== null}
<button class="w-fit" on:click={() => (open = !open)}>
<button class={buttonClassName} on:click={() => (open = !open)}>
<div class=" w-fit font-medium transition flex items-center justify-between gap-2">
<div>
{title}
@@ -28,7 +29,7 @@
</div>
</button>
{:else}
<button on:click={() => (open = !open)}>
<button class={buttonClassName} on:click={() => (open = !open)}>
<div
class="flex items-center gap-2 text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 transition"
>