overleaf-cep/services/web/frontend/js/features/ide-redesign/components/file-tree/file-tree-action-button.tsx
David 061f10a059 Merge pull request #25752 from overleaf/dp-delete-multiple-files
Add bulk delete button to file tree toolbar

GitOrigin-RevId: c857d8f5027eddb29b1ca324efe1a0e94ef4c28b
2025-05-22 08:06:42 +00:00

33 lines
737 B
TypeScript

import OLTooltip from '@/features/ui/components/ol/ol-tooltip'
import MaterialIcon, {
AvailableUnfilledIcon,
} from '@/shared/components/material-icon'
import React from 'react'
export default function FileTreeActionButton({
id,
description,
onClick,
iconType,
}: {
id: string
description: string
onClick: () => void
iconType: AvailableUnfilledIcon
}) {
return (
<OLTooltip
id={id}
description={description}
overlayProps={{ placement: 'bottom' }}
>
<button className="btn file-tree-toolbar-action-button" onClick={onClick}>
<MaterialIcon
unfilled
type={iconType}
accessibilityLabel={description}
/>
</button>
</OLTooltip>
)
}