Skip to content

Commit

Permalink
next: made the filtering controls bigger
Browse files Browse the repository at this point in the history
  • Loading branch information
niemyjski committed Feb 23, 2025
1 parent eb6dcec commit de46582
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
let { children }: Props = $props();
</script>

<Badge class="rounded-sm px-1 font-normal lg:hidden" variant="secondary">
<Badge class="rounded-sm py-1.5 font-normal lg:hidden" variant="secondary">
<span class="max-w-24 truncate md:max-w-48">{@render children()}</span>
</Badge>
<div class="hidden space-x-1 lg:flex">
<Badge class="rounded-sm px-1 font-normal" variant="secondary">
<Badge class="rounded-sm py-1.5 font-normal" variant="secondary">
<span class="max-w-60 truncate md:max-w-120">{@render children()}</span>
</Badge>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@
</script>

{#if values.length > 0}
<Badge class="rounded-sm px-1 font-normal lg:hidden" variant="secondary">
<Badge class="rounded-sm py-1.5 font-normal lg:hidden" variant="secondary">
{values.length}
</Badge>
<div class="hidden space-x-1 lg:flex">
{#if values.length > 2}
<Badge class="rounded-sm px-1 font-normal" variant="secondary">
<Badge class="rounded-sm py-1.5 font-normal" variant="secondary">
{values.length} Selected
</Badge>
{:else}
{#each values as value (value)}
<Badge class="rounded-sm px-1 font-normal" variant="secondary">
<Badge class="rounded-sm py-1.5 font-normal" variant="secondary">
<span class="max-w-24 truncate md:max-w-48">{@render displayValue(value)}</span>
</Badge>
{/each}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
<Popover.Root bind:open>
<Popover.Trigger>
{#snippet children()}
<Button class="h-8" size="sm" variant="outline">
<Button class="gap-x-1 px-3" size="lg" variant="outline">
{title}
<Separator class="mx-2 h-4" orientation="vertical" />
<Separator class="mx-2" orientation="vertical" />
{#if value}
<FacetedFilter.BadgeValue>{value}</FacetedFilter.BadgeValue>
{:else}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
<Popover.Root bind:open>
<Popover.Trigger>
{#snippet children()}
<Button class="h-8" size="sm" variant="outline">
<Button class="gap-x-1 px-3" size="lg" variant="outline">
<Circle class="mr-2 size-4" /> Filter
</Button>
{/snippet}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@
<Popover.Root bind:open>
<Popover.Trigger>
{#snippet children()}
<Button class="h-8" size="sm" variant="outline">
<Button class="gap-x-1 px-3" size="lg" variant="outline">
{title}
<Separator class="mx-2 h-4" orientation="vertical" />
<Separator class="mx-2" orientation="vertical" />
{#if loading}
<FacetedFilter.BadgeLoading />
{:else if value !== undefined}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
<Popover.Root bind:open>
<Popover.Trigger>
{#snippet children()}
<Button class="h-8" size="sm" variant="outline">
<Button class="gap-x-1 px-3" size="lg" variant="outline">
{title}
<Separator class="mx-2 h-4" orientation="vertical" />
<Separator class="mx-2" orientation="vertical" />
{#if value}
<FacetedFilter.BadgeValue>{value}</FacetedFilter.BadgeValue>
{:else}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@
<Popover.Root bind:open>
<Popover.Trigger>
{#snippet children()}
<Button class="h-8" size="sm" variant="outline">
<Button class="gap-x-1 px-3" size="lg" variant="outline">
{title}
<Separator class="mx-2 h-4" orientation="vertical" />
<Separator class="mx-2" orientation="vertical" />
{#if loading}
<FacetedFilter.BadgeLoading />
{:else if values.length > 0}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
<Popover.Root bind:open>
<Popover.Trigger>
{#snippet children()}
<Button class="h-8" size="sm" variant="outline">
<Button class="gap-x-1 px-3" size="lg" variant="outline">
{title}
<Separator class="mx-2 h-4" orientation="vertical" />
<Separator class="mx-2" orientation="vertical" />
{#if value !== undefined && !isNaN(value)}
<FacetedFilter.BadgeValue>{value}</FacetedFilter.BadgeValue>
{:else}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
<Popover.Root bind:open>
<Popover.Trigger>
{#snippet children()}
<Button class="h-8" size="sm" variant="outline">
<Button class="gap-x-1 px-3" size="lg" variant="outline">
{title}
<Separator class="mx-2 h-4" orientation="vertical" />
<Separator class="mx-2" orientation="vertical" />
{#if value?.trim()}
<FacetedFilter.BadgeValue>{value}</FacetedFilter.BadgeValue>
{:else}
Expand Down

0 comments on commit de46582

Please sign in to comment.