0 ? ` (${filter.overdueCount} overdue)` : ''}`
- }
- placement='bottom'
- >
- !hasWarning && onFilterClick(filter.id)}>
+ return (
+ 0 ? ` (${filter.overdueCount} overdue)` : ''}`
+ }
+ placement='bottom'
+ >
handleContextMenu(e, filter)}
+ onClick={() => !hasWarning && onFilterClick(filter.id)}
sx={{
cursor: hasWarning ? 'not-allowed' : 'pointer',
- transition: 'all 0.2s ease',
- px: 1.0,
- py: 0.5,
+ transition: 'background-color 0.15s ease, color 0.15s ease',
+ px: 1,
height: 32,
- display: 'flex',
- alignItems: 'center',
-
- opacity: hasWarning ? 0.7 : isActive ? 1 : 0.85,
- ...(hasCustomColor && {
- backgroundColor: `${filter.color} !important`,
- color: `${textColor} !important`,
- '&:hover': {
- backgroundColor: `${filter.color} !important`,
- filter: 'brightness(0.95)',
- opacity: 1,
- },
- }),
+ flexShrink: 0,
+ fontWeight: isActive ? 600 : 500,
+ '&:hover': {
+ backgroundColor: isActive ? undefined : 'neutral.softHoverBg',
+ },
}}
startDecorator={
-
- {isActive ? (
-
- ) : (
-
- {filter.count}
-
- )}
-
+ !hasWarning && (
+
+ {isActive ? (
+
+ ) : (
+
+ {displayCount}
+
+ )}
+
+ )
+ }
+ endDecorator={
+ {
+ e.stopPropagation()
+ handleContextMenu(e, filter)
+ }}
+ sx={{
+ '--IconButton-size': '20px',
+ ml: 0.25,
+ opacity: 0.6,
+ '&:hover': { opacity: 1, backgroundColor: 'transparent' },
+ }}
+ >
+
+
}
- // endDecorator={
- //
- // {hasWarning && }
- // {!hasWarning && filter.overdueCount > 0 && (
- //
- // {filter.overdueCount}
- //
- // )}
- //
- // }
>
{filter.name}
-
-
- )
- })}
+
+ )
+ })}
-