Merge branch 'cleanup-header'

This commit is contained in:
RevIQ
2026-01-10 16:42:16 +08:00
2 changed files with 1 additions and 34 deletions

View File

@@ -10,12 +10,6 @@ interface Props {
}
let { title, class: className }: Props = $props();
const filters = [
{ label: "This month", removable: true },
{ label: "6 countries", removable: true },
{ label: "3 domains", removable: true },
];
</script>
<header
@@ -29,33 +23,6 @@ const filters = [
<MobileNav class="lg:hidden" />
<h1 class="text-base font-semibold tracking-tight text-foreground lg:text-lg">{title}</h1>
<!-- Filters - hidden on mobile -->
{#if filters.length > 0}
<div class="hidden items-center gap-4 lg:flex">
<Separator orientation="vertical" class="h-5" />
<div class="flex items-center gap-2">
{#each filters as filter}
<div
class="group flex items-center gap-1.5 rounded-md border border-border bg-background px-2.5 py-1 text-xs font-medium text-muted-foreground transition-colors hover:border-muted-foreground/30"
>
<span>{filter.label}</span>
{#if filter.removable}
<button
class="rounded-sm p-0.5 opacity-60 transition-opacity hover:opacity-100"
aria-label="Remove filter"
>
<svg class="h-3 w-3" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M18 6L6 18M6 6l12 12" stroke-linecap="round" stroke-linejoin="round" />
</svg>
</button>
{/if}
</div>
{/each}
</div>
</div>
{/if}
</div>
<div class="flex items-center gap-1">

View File

@@ -20,7 +20,7 @@ let {
data-inset={inset}
data-variant={variant}
class={cn(
"data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:data-highlighted:bg-destructive/10 dark:data-[variant=destructive]:data-highlighted:bg-destructive/20 data-[variant=destructive]:data-highlighted:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:ps-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
"data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:data-highlighted:bg-destructive/10 dark:data-[variant=destructive]:data-highlighted:bg-destructive/20 data-[variant=destructive]:data-highlighted:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:ps-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
className
)}
{...restProps}