mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
20b27116f8
Enable symbol palette for beta users GitOrigin-RevId: 36840499b5732cc9087e0cc6e9aef861b16009f5
31 lines
791 B
JavaScript
31 lines
791 B
JavaScript
import React from 'react'
|
|
import { OverlayTrigger, Tooltip } from 'react-bootstrap'
|
|
import PropTypes from 'prop-types'
|
|
|
|
export default function BetaBadge({ tooltip, url = '/beta/participate' }) {
|
|
return (
|
|
<OverlayTrigger
|
|
placement={tooltip.placement || 'bottom'}
|
|
overlay={<Tooltip id={tooltip.id}>{tooltip.text}</Tooltip>}
|
|
delayHide={100}
|
|
>
|
|
<a
|
|
href={url}
|
|
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,
|
|
placement: PropTypes.string,
|
|
}),
|
|
url: PropTypes.string,
|
|
}
|