mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 13:13:45 +01:00
Co-authored-by: Davinder Singh <davibaweja@gmail.com> GitOrigin-RevId: 9e169f3591cfff2fdae63b461b946fde4611f2d7
40 lines
816 B
TypeScript
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>
|
|
)
|
|
}
|