feat: delete unnecessary components
This commit is contained in:
@@ -77,6 +77,12 @@ export interface FilterStore<T extends FilterModel> extends Writable<T> {
|
||||
* @param category - Category to deselect
|
||||
*/
|
||||
deselectCategory: (categoryId: string) => void;
|
||||
/**
|
||||
* Toggle a category.
|
||||
*
|
||||
* @param categoryId - Category ID
|
||||
*/
|
||||
toggleCategory: (categoryId: string) => void;
|
||||
/**
|
||||
* Select all categories.
|
||||
*/
|
||||
@@ -185,6 +191,19 @@ export function createFilterStore<T extends FilterModel>(
|
||||
),
|
||||
}));
|
||||
},
|
||||
/**
|
||||
* Toggle a category.
|
||||
*
|
||||
* @param categoryId - Category ID
|
||||
*/
|
||||
toggleCategory: (categoryId: string) => {
|
||||
update(state => ({
|
||||
...state,
|
||||
categories: state.categories.map(c =>
|
||||
c.id === categoryId ? { ...c, selected: !c.selected } : c
|
||||
),
|
||||
}));
|
||||
},
|
||||
/**
|
||||
* Select all categories
|
||||
*/
|
||||
|
||||
@@ -110,7 +110,7 @@ const hasSelection = $derived(selectedCount > 0);
|
||||
class="border-t"
|
||||
>
|
||||
<div class="px-4 py-3">
|
||||
<div class="flex flex-col gap-2.5">
|
||||
<div class="flex flex-col gap-1.5">
|
||||
<!-- Each item: checkbox + label with interactive hover/focus states -->
|
||||
<!-- Keyed by category.id for efficient DOM updates -->
|
||||
{#each categories as category (category.id)}
|
||||
|
||||
Reference in New Issue
Block a user