|
15 | 15 | */
|
16 | 16 |
|
17 | 17 | import { useState, useEffect, ReactNode } from 'react'
|
18 |
| -import Tippy from '@tippyjs/react' |
19 | 18 | import { ReactComponent as Info } from '@Icons/ic-info-outlined.svg'
|
20 |
| -import { getBranchIcon, getWebhookEventsForEventId, SourceTypeMap } from '../../../Common' |
| 19 | +import { getBranchIcon, getWebhookEventsForEventId, SourceTypeMap, Tooltip } from '../../../Common' |
21 | 20 | import { GIT_BRANCH_NOT_CONFIGURED, DEFAULT_GIT_BRANCH_VALUE } from './constants'
|
22 | 21 | import { buildHoverHtmlForWebhook } from './utils'
|
23 | 22 | import { CIPipelineSourceConfigInterface } from './types'
|
@@ -119,18 +118,19 @@ export const CiPipelineSourceConfig = ({
|
119 | 118 | }, [])
|
120 | 119 |
|
121 | 120 | return (
|
122 |
| - <div className={`flex left dc__align-start ${showTooltip ? 'fw-5' : ''} ${rootClassName}`}> |
| 121 | + <div className={`flex left ${showTooltip ? 'fw-5' : ''} ${rootClassName}`}> |
123 | 122 | {loading && showIcons && <span className="dc__loading-dots">loading</span>}
|
124 | 123 | {!loading && (
|
125 |
| - <div className="flex dc__gap-4"> |
| 124 | + <div className="flexbox dc__gap-4 dc__align-start"> |
126 | 125 | {showIcons && (
|
127 | 126 | <span className="icon-dim-12 flex dc__no-shrink dc__fill-available-space mt-4">
|
128 | 127 | {getBranchIcon(sourceType, _isRegex, sourceValueBase)}
|
129 | 128 | </span>
|
130 | 129 | )}
|
131 |
| - {showTooltip && ( |
132 |
| - <Tippy |
133 |
| - className="default-tt dc__word-break-all" |
| 130 | + {showTooltip ? ( |
| 131 | + <Tooltip |
| 132 | + wordBreak |
| 133 | + alwaysShowTippyOnHover |
134 | 134 | arrow={false}
|
135 | 135 | placement="bottom"
|
136 | 136 | content={sourceValueAdv}
|
@@ -159,9 +159,10 @@ export const CiPipelineSourceConfig = ({
|
159 | 159 | </span>
|
160 | 160 | )}
|
161 | 161 | </div>
|
162 |
| - </Tippy> |
| 162 | + </Tooltip> |
| 163 | + ) : ( |
| 164 | + <span className="dc__ellipsis-right">{sourceValueAdv}</span> |
163 | 165 | )}
|
164 |
| - {!showTooltip && <span className="dc__ellipsis-right">{sourceValueAdv}</span>} |
165 | 166 | </div>
|
166 | 167 | )}
|
167 | 168 | </div>
|
|
0 commit comments