From 401fca2648f4dbe00bdfbb1eb80217990902cd91 Mon Sep 17 00:00:00 2001 From: Arya Khochare <91268931+Aryakoste@users.noreply.github.com> Date: Mon, 29 Jul 2024 00:32:08 +0530 Subject: [PATCH] [MM-59330] Migrate tooltips of "components/drafts/draft_actions/action.tsx" to WithTooltip (#27650) --- .../__snapshots__/action.test.tsx.snap | 25 +++---------------- .../drafts/draft_actions/action.tsx | 24 +++++------------- 2 files changed, 10 insertions(+), 39 deletions(-) diff --git a/webapp/channels/src/components/drafts/draft_actions/__snapshots__/action.test.tsx.snap b/webapp/channels/src/components/drafts/draft_actions/__snapshots__/action.test.tsx.snap index a6f03bd5d07..66b8ce6821f 100644 --- a/webapp/channels/src/components/drafts/draft_actions/__snapshots__/action.test.tsx.snap +++ b/webapp/channels/src/components/drafts/draft_actions/__snapshots__/action.test.tsx.snap @@ -4,27 +4,10 @@ exports[`components/drafts/draft_actions/action should match snapshot 1`] = `
- - - - } + - +
`; diff --git a/webapp/channels/src/components/drafts/draft_actions/action.tsx b/webapp/channels/src/components/drafts/draft_actions/action.tsx index a8b32d90c0d..9c966f4da5c 100644 --- a/webapp/channels/src/components/drafts/draft_actions/action.tsx +++ b/webapp/channels/src/components/drafts/draft_actions/action.tsx @@ -3,37 +3,25 @@ import classNames from 'classnames'; import React from 'react'; -import {Tooltip} from 'react-bootstrap'; - -import OverlayTrigger from 'components/overlay_trigger'; - -import Constants from 'utils/constants'; import './action.scss'; +import WithTooltip from 'components/with_tooltip'; type Props = { icon: string; id: string; name: string; onClick: (e: React.MouseEvent) => void; - tooltipText: React.ReactNode; + tooltipText: React.ReactElement | string; }; function Action({name, icon, onClick, id, tooltipText}: Props) { return (
- - {tooltipText} - - } + title={tooltipText} > - +
); }