diff --git a/src/shared/ui/CheckboxFilter/CheckboxFilter.svelte b/src/shared/ui/CheckboxFilter/CheckboxFilter.svelte index 50d1692..25a067d 100644 --- a/src/shared/ui/CheckboxFilter/CheckboxFilter.svelte +++ b/src/shared/ui/CheckboxFilter/CheckboxFilter.svelte @@ -1,35 +1,24 @@ - - + + {filterName} - + + + + + {#if hasSelection} + + {selectedCount} + + {/if} - - {#if isOpen} - - + {#if isOpen} + + + {#each categories as category (category.id)} - + onCategoryToggle(category.id)} - class="cursor-pointer transition-transform active:scale-95" + checked={category.selected} + onchange={() => onCategoryToggle(category.id)} + class=" + shrink-0 cursor-pointer transition-all duration-150 ease-out + data-[state=checked]:scale-100 + hover:border-primary/50 + focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 + " /> - {category.name} - - + + {/each} - {/if} - + + {/if}