diff --git a/src/components/HighlightsPanel/HighlightsPanelHeader.tsx b/src/components/HighlightsPanel/HighlightsPanelHeader.tsx index 2faffc05..fa156592 100644 --- a/src/components/HighlightsPanel/HighlightsPanelHeader.tsx +++ b/src/components/HighlightsPanel/HighlightsPanelHeader.tsx @@ -1,7 +1,7 @@ import React from 'react' -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faChevronRight, faEye, faEyeSlash, faRotate, faUser, faUserGroup, faNetworkWired } from '@fortawesome/free-solid-svg-icons' import { HighlightVisibility } from '../HighlightsPanel' +import IconButton from '../IconButton' interface HighlightsPanelHeaderProps { loading: boolean @@ -32,76 +32,72 @@ const HighlightsPanelHeader: React.FC = ({
{onHighlightVisibilityChange && (
- - - + style={{ color: highlightVisibility.mine ? 'var(--highlight-color-mine, #eab308)' : undefined }} + />
)} {onRefresh && ( - + spin={loading} + /> )} {hasHighlights && ( - + ariaLabel={showHighlights ? 'Hide highlights' : 'Show highlights'} + variant="ghost" + /> )}
- + ariaLabel="Collapse highlights panel" + variant="ghost" + style={{ transform: 'rotate(180deg)' }} + /> ) diff --git a/src/components/IconButton.tsx b/src/components/IconButton.tsx index 8b046d28..bbde52a3 100644 --- a/src/components/IconButton.tsx +++ b/src/components/IconButton.tsx @@ -12,6 +12,7 @@ interface IconButtonProps { disabled?: boolean spin?: boolean className?: string + style?: React.CSSProperties } const IconButton: React.FC = ({ @@ -23,7 +24,8 @@ const IconButton: React.FC = ({ size = 33, disabled = false, spin = false, - className = '' + className = '', + style }) => { return (