overleaf/services/web/frontend/js/features/file-tree/components/file-tree-badge.js
Timothée Alby c78a2f1809 Merge pull request #3536 from overleaf/ta-file-tree-beta
[ReactFileTree] Release to Beta Users

GitOrigin-RevId: 34e4120c6e296e11b21c23e350b9b516c0ce5428
2021-01-08 03:05:28 +00:00

29 lines
729 B
JavaScript

import React from 'react'
import { useTranslation } from 'react-i18next'
import { OverlayTrigger, Tooltip } from 'react-bootstrap'
function FileTreeBadge() {
const { t } = useTranslation()
const tooltip = (
<Tooltip id="file-tree-badge-tooltip">
{t('file_tree_badge_tooltip')}
</Tooltip>
)
return (
<OverlayTrigger placement="bottom" overlay={tooltip} delayHide={100}>
<a
href="/beta/participate"
target="_blank"
rel="noopener noreferrer"
className="badge beta-badge"
onClick={ev => ev.stopPropagation()}
>
<span className="sr-only">{t('file_tree_badge_tooltip')}</span>
</a>
</OverlayTrigger>
)
}
export default FileTreeBadge