mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
be804b5fc1
* Add BetaBadge component * Add beta_badge_tooltip translation * Add beta badge to modal headers * Enable Share and Add Files modals for beta users GitOrigin-RevId: df0933830a0745c0ecf57db34f2cb75104a570cd
29 lines
695 B
JavaScript
29 lines
695 B
JavaScript
import React from 'react'
|
|
import { OverlayTrigger, Tooltip } from 'react-bootstrap'
|
|
import PropTypes from 'prop-types'
|
|
|
|
export default function BetaBadge({ tooltip }) {
|
|
return (
|
|
<OverlayTrigger
|
|
placement="bottom"
|
|
overlay={<Tooltip id={tooltip.id}>{tooltip.text}</Tooltip>}
|
|
delayHide={100}
|
|
>
|
|
<a
|
|
href="/beta/participate"
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
className="badge beta-badge"
|
|
>
|
|
<span className="sr-only">{tooltip.text}</span>
|
|
</a>
|
|
</OverlayTrigger>
|
|
)
|
|
}
|
|
|
|
BetaBadge.propTypes = {
|
|
tooltip: PropTypes.exact({
|
|
id: PropTypes.string.isRequired,
|
|
text: PropTypes.string.isRequired
|
|
})
|
|
}
|