mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2025-07-29 14:00:05 +02:00
27 lines
823 B
TypeScript
27 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>
|
|
)
|
|
})
|