style: unify filter bar design — kill FILTERS label, solid orange pills
- Remove redundant "FILTERS" uppercase label - Change pills from washed-out orange/10 border to solid brand-orange with white text for strong contrast in both light and dark mode - Pills now use rounded-lg to match the Filter button shape - FilterBar renders fragments (no wrapper div) so everything flows naturally in the parent flex row
This commit is contained in:
@@ -12,19 +12,16 @@ export default function FilterBar({ filters, onRemove, onClear }: FilterBarProps
|
|||||||
if (filters.length === 0) return null
|
if (filters.length === 0) return null
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-wrap items-center gap-2 mb-4">
|
<>
|
||||||
<span className="text-xs font-medium text-neutral-500 dark:text-neutral-400 uppercase tracking-wider">
|
|
||||||
Filters
|
|
||||||
</span>
|
|
||||||
{filters.map((f, i) => (
|
{filters.map((f, i) => (
|
||||||
<button
|
<button
|
||||||
key={`${f.dimension}-${f.operator}-${f.values.join(',')}`}
|
key={`${f.dimension}-${f.operator}-${f.values.join(',')}`}
|
||||||
onClick={() => onRemove(i)}
|
onClick={() => onRemove(i)}
|
||||||
className="inline-flex items-center gap-1.5 px-2.5 py-1 text-xs font-medium rounded-full bg-brand-orange/10 text-brand-orange border border-brand-orange/20 hover:bg-brand-orange/20 transition-colors cursor-pointer group"
|
className="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-lg bg-brand-orange text-white hover:bg-brand-orange/80 transition-colors cursor-pointer group"
|
||||||
title={`Remove filter: ${filterLabel(f)}`}
|
title={`Remove filter: ${filterLabel(f)}`}
|
||||||
>
|
>
|
||||||
<span>{filterLabel(f)}</span>
|
<span>{filterLabel(f)}</span>
|
||||||
<svg className="w-3 h-3 opacity-60 group-hover:opacity-100" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}>
|
<svg className="w-3 h-3 opacity-70 group-hover:opacity-100" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}>
|
||||||
<path strokeLinecap="round" strokeLinejoin="round" d="M6 18L18 6M6 6l12 12" />
|
<path strokeLinecap="round" strokeLinejoin="round" d="M6 18L18 6M6 6l12 12" />
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
@@ -32,11 +29,11 @@ export default function FilterBar({ filters, onRemove, onClear }: FilterBarProps
|
|||||||
{filters.length > 1 && (
|
{filters.length > 1 && (
|
||||||
<button
|
<button
|
||||||
onClick={onClear}
|
onClick={onClear}
|
||||||
className="text-xs text-neutral-500 dark:text-neutral-400 hover:text-neutral-700 dark:hover:text-neutral-200 transition-colors cursor-pointer"
|
className="px-2 py-1.5 text-xs font-medium text-neutral-500 dark:text-neutral-400 hover:text-neutral-900 dark:hover:text-white transition-colors cursor-pointer"
|
||||||
>
|
>
|
||||||
Clear all
|
Clear all
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user