Files
overleaf-cep/services/web/frontend/js/features/file-tree/components/file-tree-action-button.tsx
T
Mathias JakobsenandDavinder Singh 1acb00407e [web] Disable various editor buttons during network stall (#34247)
Co-authored-by: Davinder Singh <davibaweja@gmail.com>
GitOrigin-RevId: 9e169f3591cfff2fdae63b461b946fde4611f2d7
2026-09-17 11:25:49 +00:00

40 lines
816 B
TypeScript

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