From d939c1bd464780d7be4912510e25f9791d3b3aae Mon Sep 17 00:00:00 2001 From: Ningthoujam Swamikumar Singh <79131035+ningthoujamSwamikumar@users.noreply.github.com> Date: Mon, 8 Jul 2024 22:20:55 +0530 Subject: [PATCH] [MM-58856] Migrate tooltips of "components/copy_button.tsx" to WithTooltip (#27433) --- .../channels/src/components/copy_button.tsx | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/webapp/channels/src/components/copy_button.tsx b/webapp/channels/src/components/copy_button.tsx index 4d0ba89a39..6eda797966 100644 --- a/webapp/channels/src/components/copy_button.tsx +++ b/webapp/channels/src/components/copy_button.tsx @@ -3,14 +3,12 @@ import classNames from 'classnames'; import React, {useRef, useState} from 'react'; -import {Tooltip} from 'react-bootstrap'; import {FormattedMessage, defineMessages, useIntl} from 'react-intl'; -import OverlayTrigger from 'components/overlay_trigger'; - -import Constants from 'utils/constants'; import {copyToClipboard} from 'utils/utils'; +import WithTooltip from './with_tooltip'; + type Props = { content: string; isForText?: boolean; @@ -48,20 +46,17 @@ const CopyButton: React.FC = (props: Props) => { tooltipMessage = messages.copyCode; } - const tooltip = ( - - - + const tooltipText = ( + ); const spanClassName = classNames('post-code__clipboard', props.className); return ( - = (props: Props) => { /> } - + ); };