Files
Verso/services/web/frontend/js/features/ide-redesign/components/toolbar/logos.tsx
T
Alf Eaton 7e3b853fc1 Revert "Show tooltip immediately if a tooltip is already open (#28870)" (#28935)
This reverts commit 74950ea7e705acb8f42dea552b23ce93c66058c7.

GitOrigin-RevId: 346a947c420448becf294f0174937a5c256bf945
2025-10-09 08:08:14 +00:00

47 lines
1.5 KiB
TypeScript

import OLTooltip from '@/shared/components/ol/ol-tooltip'
import MaterialIcon from '@/shared/components/material-icon'
import { useTranslation } from 'react-i18next'
import { Cobranding } from '../../../../../../types/cobranding'
type ToolbarLogosProps = {
cobranding?: Cobranding
}
export const ToolbarLogos = ({ cobranding }: ToolbarLogosProps) => {
const { t } = useTranslation()
return (
<div className="ide-redesign-toolbar-logos">
<OLTooltip
id="tooltip-home-button"
description={t('back_to_your_projects')}
overlayProps={{ delay: 0, placement: 'bottom' }}
>
<div className="ide-redesign-toolbar-home-button">
<a href="/project" className="ide-redesign-toolbar-home-link">
<span className="toolbar-ol-logo" aria-label={t('overleaf_logo')} />
<MaterialIcon type="home" className="toolbar-ol-home-button" />
</a>
</div>
</OLTooltip>
{cobranding && cobranding.logoImgUrl && (
<>
<span className="ide-redesign-toolbar-cobranding-separator" />
<a
className="ide-redesign-toolbar-cobranding-link"
href={cobranding.brandVariationHomeUrl}
target="_blank"
rel="noreferrer noopener"
>
<img
src={cobranding.logoImgUrl}
className="ide-redesign-toolbar-cobranding-logo"
alt={cobranding.brandVariationName}
/>
</a>
</>
)}
</div>
)
}