Files
overleaf-cep/services/web/frontend/js/features/review-panel/components/review-panel-change-action.tsx
T
Rebeka Dekany e2a8bf768b Merge intermediate component wrappers into OL-prefixed components (#34996)
* Merge intermediate component wrappers into OL-prefixed components

* Replace all intermediate wrapper consumers with OL-prefixed components directly

* Fix jsx/js files still importing deleted shim components

* Remove duplicate OLNotification imports left by first pass

* Rename OLTagIcon to TagIcon, remove OL prefix

* Rename OLDropdownMenuItem to DropdownMenuItem, remove OL prefix

* Remove OLNotification, use Notification directly

* Move Notification to the main shared component folder

* Update tag-icon import path out of ol/

* Move TagIcon to the main shared component folder

* Update dropdown-menu-item import path out of ol/

* Move DropdownMenuItem to the main shared component folder

* Fix dropdown-menu-item import path to dropdown/ subfolder

* Remove BS5 alias prefixes from shared components

* Restore notification-list wrapper in Notification component

* Add translation for loading button

* Remove redundant import aliasing

* Resolve conflicts

* Restore notification container `notification-list`

GitOrigin-RevId: 24a5af18599a3e02ac6fd61c09cf5a49ef6e0020
2026-09-17 11:19:34 +00:00

36 lines
1.1 KiB
TypeScript

import OLTooltip from '@/shared/components/ol/ol-tooltip'
import { ComponentProps, memo, MouseEventHandler } from 'react'
import { PreventSelectingEntry } from '@/features/review-panel/components/review-panel-prevent-selecting'
import MaterialIcon from '@/shared/components/material-icon'
const changeActionTooltipProps: Partial<ComponentProps<typeof OLTooltip>> = {
overlayProps: { placement: 'bottom' },
tooltipProps: { className: 'review-panel-tooltip' },
}
export const ChangeAction = memo<{
id: string
label: string
type: string
handleClick: MouseEventHandler<HTMLButtonElement>
}>(function ChangeAction({ id, label, type, handleClick }) {
return (
<PreventSelectingEntry>
<OLTooltip id={id} description={label} {...changeActionTooltipProps}>
<button
type="button"
className="btn"
onClick={handleClick}
tabIndex={0}
>
<MaterialIcon
type={type}
className="review-panel-entry-actions-icon"
accessibilityLabel={label}
/>
</button>
</OLTooltip>
</PreventSelectingEntry>
)
})