Skip to content

Commit

Permalink
[MM-59900] Migrate tooltips of 'components/create_team/components/tea…
Browse files Browse the repository at this point in the history
…m_url/team_url.tsx' to WithTooltip (mattermost#27822)
  • Loading branch information
Camillarhi authored Aug 7, 2024
1 parent 35077dd commit 5011d45
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,17 @@ exports[`/components/create_team/components/display_name should match snapshot 1
<div
className="input-group input-group--limit"
>
<OverlayTrigger
defaultOverlayShown={false}
delayShow={400}
overlay={
<Tooltip
id="urlTooltip"
>
http://localhost:8065/
</Tooltip>
}
<WithTooltip
id="urlTooltip"
placement="top"
trigger={
Array [
"hover",
"focus",
]
}
title="http://localhost:8065/"
>
<span
className="input-group-addon"
>
http://localhost:8065/
</span>
</OverlayTrigger>
</WithTooltip>
<input
autoFocus={true}
className="form-control"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ import type {ActionResult} from 'mattermost-redux/types/actions';
import {trackEvent} from 'actions/telemetry_actions.jsx';

import ExternalLink from 'components/external_link';
import OverlayTrigger from 'components/overlay_trigger';
import Tooltip from 'components/tooltip';
import WithTooltip from 'components/with_tooltip';

import logoImage from 'images/logo.png';
import Constants from 'utils/constants';
Expand Down Expand Up @@ -197,9 +196,6 @@ export default class TeamUrl extends React.PureComponent<Props, State> {
}

const title = `${URL.getSiteURL()}/`;
const urlTooltip = (
<Tooltip id='urlTooltip'>{title}</Tooltip>
);

let finishMessage = (
<FormattedMessage
Expand Down Expand Up @@ -236,15 +232,15 @@ export default class TeamUrl extends React.PureComponent<Props, State> {
<div className='row'>
<div className='col-sm-11'>
<div className='input-group input-group--limit'>
<OverlayTrigger
delayShow={Constants.OVERLAY_TIME_DELAY}
placement='top'
overlay={urlTooltip}
<WithTooltip
id='urlTooltip'
title={title}
placement={'top'}
>
<span className='input-group-addon'>
{title}
</span>
</OverlayTrigger>
</WithTooltip>
<input
id='teamURLInput'
type='text'
Expand Down

0 comments on commit 5011d45

Please sign in to comment.