diff --git a/src/components/SidebarParts.tsx b/src/components/SidebarParts.tsx index a7e5e3a0..f4d4a194 100644 --- a/src/components/SidebarParts.tsx +++ b/src/components/SidebarParts.tsx @@ -1,7 +1,7 @@ import { type ComponentType, useState, useEffect, useRef } from 'react' import type { SidebarSelection } from '../types' import { cn } from '@/lib/utils' -import { getTypeColor } from '../utils/typeColors' +import { getTypeColor, getTypeLightColor } from '../utils/typeColors' import { type IconProps } from '@phosphor-icons/react' export interface SectionGroup { @@ -94,11 +94,13 @@ export function SectionContent({ }: SectionContentProps) { const { label, type, Icon, customColor } = group const sectionColor = getTypeColor(type, customColor) + const sectionLightColor = getTypeLightColor(type, customColor) return ( onSelect({ kind: 'sectionGroup', type })} @@ -142,9 +144,9 @@ function InlineRenameInput({ initialValue, onSubmit, onCancel }: { ) } -function SectionHeader({ label, type, Icon, sectionColor, itemCount, isActive, onSelect, onContextMenu, dragHandleProps, isRenaming, renameInitialValue, onRenameSubmit, onRenameCancel }: { +function SectionHeader({ label, type, Icon, sectionColor, sectionLightColor, itemCount, isActive, onSelect, onContextMenu, dragHandleProps, isRenaming, renameInitialValue, onRenameSubmit, onRenameCancel }: { label: string; type: string; Icon: ComponentType - sectionColor: string; itemCount: number; isActive: boolean + sectionColor: string; sectionLightColor: string; itemCount: number; isActive: boolean onSelect: () => void; onContextMenu: (e: React.MouseEvent) => void dragHandleProps?: Record isRenaming?: boolean; renameInitialValue?: string @@ -152,14 +154,14 @@ function SectionHeader({ label, type, Icon, sectionColor, itemCount, isActive, o }) { return (
{ if (!isRenaming) onSelect() }} onContextMenu={isRenaming ? undefined : onContextMenu} >
- + {isRenaming && onRenameSubmit && onRenameCancel ? ( ) : ( - {label} + {label} )}
{itemCount > 0 && ( - + {itemCount} )}