overleaf/services/web/frontend/js/features/editor-navigation-toolbar/components/back-to-projects-button.js
Alexandre Bourdin fe18fbe157 Merge pull request #7862 from overleaf/ab-home-button-style
[web] Make the home button more consistent with the rest of the header

GitOrigin-RevId: 456727917fd61423ca2b41eedb79d9861675d2cb
2022-05-12 10:40:23 +00:00

30 lines
732 B
JavaScript

import Icon from '../../../shared/components/icon'
import { useTranslation } from 'react-i18next'
import { OverlayTrigger, Tooltip } from 'react-bootstrap'
function BackToProjectsButton() {
const { t } = useTranslation()
return (
<OverlayTrigger
placement="right"
overlay={
<Tooltip id="back-to-projects-tooltip">
{t('back_to_your_projects')}
</Tooltip>
}
>
<div className="toolbar-item">
<a className="btn btn-full-height" href="/project">
<Icon
type="home"
fw
accessibilityLabel={t('back_to_your_projects')}
/>
</a>
</div>
</OverlayTrigger>
)
}
export default BackToProjectsButton