refactor: simplify filter icon colors to blue (except green for completed)

This commit is contained in:
Gigi
2025-10-16 09:33:04 +02:00
parent bedf3daed1
commit ed17a68986

View File

@@ -12,18 +12,19 @@ interface ReadingProgressFiltersProps {
const ReadingProgressFilters: React.FC<ReadingProgressFiltersProps> = ({ selectedFilter, onFilterChange }) => { const ReadingProgressFilters: React.FC<ReadingProgressFiltersProps> = ({ selectedFilter, onFilterChange }) => {
const filters = [ const filters = [
{ type: 'all' as const, icon: faAsterisk, label: 'All', color: undefined }, { type: 'all' as const, icon: faAsterisk, label: 'All' },
{ type: 'unopened' as const, icon: faEnvelope, label: 'Unopened', color: undefined }, { type: 'unopened' as const, icon: faEnvelope, label: 'Unopened' },
{ type: 'started' as const, icon: faEnvelopeOpen, label: 'Started', color: 'var(--color-text)' }, { type: 'started' as const, icon: faEnvelopeOpen, label: 'Started' },
{ type: 'reading' as const, icon: faBookOpen, label: 'Reading', color: '#6366f1' }, { type: 'reading' as const, icon: faBookOpen, label: 'Reading' },
{ type: 'completed' as const, icon: faCheckCircle, label: 'Completed', color: '#10b981' } { type: 'completed' as const, icon: faCheckCircle, label: 'Completed' }
] ]
return ( return (
<div className="bookmark-filters"> <div className="bookmark-filters">
{filters.map(filter => { {filters.map(filter => {
const isActive = selectedFilter === filter.type const isActive = selectedFilter === filter.type
const activeStyle = isActive && filter.color ? { color: filter.color } : undefined // Only "completed" gets green color, everything else uses default blue
const activeStyle = isActive && filter.type === 'completed' ? { color: '#10b981' } : undefined
return ( return (
<button <button