Merge pull request #8532 from overleaf/ta-dictionary-release

Prepare Dictionary Edit Feature for Release

GitOrigin-RevId: 1f17143c5aa89ec7a87c2fd0d35f1de4caabf33b
This commit is contained in:
Alexandre Bourdin 2022-06-22 11:34:42 +02:00 committed by Copybot
parent 3d26c4bb6f
commit b9b61d4f20
2 changed files with 18 additions and 3 deletions

View file

@ -42,7 +42,7 @@ export default function DictionaryModalContent({
className: 'tooltip-wide',
text: (
<>
We are beta testing the dictionary manager.
We are testing the dictionary manager.
<br />
Click to give feedback
</>
@ -58,6 +58,7 @@ export default function DictionaryModalContent({
<BetaBadge
tooltip={betaBadgeTooltipProps}
url="https://forms.gle/8cLBEW6HU9mDKBPX9"
phase="release"
/>
</Modal.Title>
</Modal.Header>

View file

@ -11,9 +11,23 @@ type TooltipProps = {
type BetaBadgeProps = {
tooltip: TooltipProps
url?: string
phase?: string
}
function BetaBadge({ tooltip, url = '/beta/participate' }: BetaBadgeProps) {
function BetaBadge({
tooltip,
url = '/beta/participate',
phase = 'beta',
}: BetaBadgeProps) {
let badgeClass
switch (phase) {
case 'release':
badgeClass = 'info-badge'
break
default:
badgeClass = 'beta-badge'
}
return (
<Tooltip
id={tooltip.id}
@ -28,7 +42,7 @@ function BetaBadge({ tooltip, url = '/beta/participate' }: BetaBadgeProps) {
href={url}
target="_blank"
rel="noopener noreferrer"
className="badge beta-badge"
className={`badge ${badgeClass}`}
>
<span className="sr-only">{tooltip.text}</span>
</a>