mirror of
https://github.com/dergigi/boris.git
synced 2026-02-16 04:24:25 +01:00
- 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
40 lines
1.2 KiB
TypeScript
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
|
|
|