refac: folders
This commit is contained in:
@@ -16,14 +16,15 @@
|
||||
export let name = '';
|
||||
export let collapsible = true;
|
||||
|
||||
export let className = '';
|
||||
export let buttonClassName = 'text-gray-600 dark:text-gray-400';
|
||||
|
||||
export let chevron = true;
|
||||
export let onAddLabel: string = '';
|
||||
export let onAdd: null | Function = null;
|
||||
|
||||
export let dragAndDrop = true;
|
||||
|
||||
export let className = '';
|
||||
|
||||
let folderElement;
|
||||
|
||||
let draggedOver = false;
|
||||
@@ -138,20 +139,20 @@
|
||||
>
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div
|
||||
class="w-full group rounded-lg relative flex items-center justify-between hover:bg-gray-100 dark:hover:bg-gray-900 text-gray-500 dark:text-gray-500 transition"
|
||||
class="w-full group rounded-lg relative flex items-center justify-between hover:bg-gray-100 dark:hover:bg-gray-900 transition {buttonClassName}"
|
||||
>
|
||||
<button class="w-full py-1.5 pl-2 flex items-center gap-1.5 text-xs font-medium">
|
||||
{#if chevron}
|
||||
<div class="text-gray-300 dark:text-gray-600 p-[1px]">
|
||||
<div class=" p-[1px]">
|
||||
{#if open}
|
||||
<ChevronDown className=" size-3.5" strokeWidth="2.5" />
|
||||
<ChevronDown className=" size-3" strokeWidth="2" />
|
||||
{:else}
|
||||
<ChevronRight className=" size-3.5" strokeWidth="2.5" />
|
||||
<ChevronRight className=" size-3" strokeWidth="2" />
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="translate-y-[0.5px]">
|
||||
<div class="translate-y-[0.5px] {chevron ? '' : 'pl-1'}">
|
||||
{name}
|
||||
</div>
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user