Files
Verso/services/web/frontend/js/features/review-panel/components/review-panel-entry-indicator.tsx
T
DavidandCopybot 9fae8d4b5b Merge pull request #27728 from overleaf/dp-rename-review-panel
Rename `review-panel-new` to simply `review-panel`

GitOrigin-RevId: 7aad0406bce60602d272bdfae7a124ed4246bd1c
2025-08-12 08:06:31 +00:00

28 lines
823 B
TypeScript

import { memo, MouseEventHandler } from 'react'
import MaterialIcon from '@/shared/components/material-icon'
export const EntryIndicator = memo<{
handleMouseEnter?: MouseEventHandler<HTMLDivElement>
handleMouseLeave?: MouseEventHandler<HTMLDivElement>
handleMouseDown?: MouseEventHandler<HTMLDivElement>
type: string
}>(function EntryIndicator({
handleMouseEnter,
handleMouseLeave,
handleMouseDown,
type,
}) {
return (
<div
className="review-panel-entry-indicator"
onMouseEnter={handleMouseEnter}
onMouseLeave={handleMouseLeave}
onMouseDown={handleMouseDown} // Using onMouseDown rather than onClick to guarantee that it fires before onFocus
role="button"
tabIndex={0}
>
<MaterialIcon type={type} className="review-panel-entry-icon" />
</div>
)
})