* merging ide-redesign/components/file-tree into features/file-tree * moving ide-redesign/contexts/settings-modal-context to features/settings/contexts * use-collapsible-file-tree.tsx → features/file-tree/hooks * use-focus-on-setting.tsx → features/settings/hooks * use-project-notification-preferences.ts → features/settings/hooks * use-rail-overflow.tsx→ features/ide-react/hooks * deleting use-switch-enable-new-editor-state.ts * use-toolbar-menu-editor-commands.tsx → features/source-editor/hooks * npm run extract-translations * modifying the test to target correct buttons and removing a test for old component * adding a test back and modifying it * changing the test GitOrigin-RevId: baa1e9a992c88b84313eea82161354d4958cf1ef
34 lines
732 B
TypeScript
34 lines
732 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,
|
|
}: {
|
|
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>
|
|
)
|
|
}
|