overleaf/services/web/frontend/js/shared/components/feedback-badge.tsx
Alf Eaton 6dbb2df5b8 Remove editor split tests (#14985)
* Remove source-editor-toolbar split test
* Remove editor-left-menu split test
* Remove paste-html split test
* Remove figure-modal split test
* Remove rich-text split test
* Remove table-generator split test

GitOrigin-RevId: e3fe415b81ff0135d8764cd3f3c91b1dd4a77cf0
2023-10-04 08:04:34 +00:00

25 lines
521 B
TypeScript

import BetaBadge from './beta-badge'
import { FC, ReactNode, useMemo } from 'react'
export const FeedbackBadge: FC<{
url: string
id: string
text?: ReactNode
}> = ({ url, id, text }) => {
const tooltip = useMemo(() => {
return {
id: `${id}-tooltip`,
text: text || <DefaultContent />,
}
}, [id, text])
return <BetaBadge tooltip={tooltip} phase="release" url={url} />
}
const DefaultContent = () => (
<>
We are testing this new feature.
<br />
Click to give feedback
</>
)