Files
boris/src/components/HighlightsPanel/HighlightsPanelCollapsed.tsx
Gigi fb06a1aec3 fix: apply user highlight color to both marker and arrow icons
- Apply color style directly to both icons in collapsed highlights button
- Update CSS to use color-agnostic pulse animation (opacity/scale)
- Remove hardcoded yellow color and drop-shadow from glow effect
2025-10-12 23:50:34 +02:00

40 lines
1.2 KiB
TypeScript

import React from 'react'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faHighlighter, faChevronRight } from '@fortawesome/free-solid-svg-icons'
import { UserSettings } from '../../services/settingsService'
interface HighlightsPanelCollapsedProps {
hasHighlights: boolean
onToggleCollapse: () => void
settings?: UserSettings
}
const HighlightsPanelCollapsed: React.FC<HighlightsPanelCollapsedProps> = ({
hasHighlights,
onToggleCollapse,
settings
}) => {
const highlightColor = settings?.highlightColorMine || '#ffff00'
return (
<div className="highlights-container collapsed">
<button
onClick={onToggleCollapse}
className={`toggle-highlights-btn with-icon ${hasHighlights ? 'has-highlights' : ''}`}
title="Expand highlights panel"
aria-label="Expand highlights panel"
>
<FontAwesomeIcon
icon={faHighlighter}
className={hasHighlights ? 'glow' : ''}
style={{ color: highlightColor }}
/>
<FontAwesomeIcon icon={faChevronRight} style={{ color: highlightColor }} />
</button>
</div>
)
}
export default HighlightsPanelCollapsed