Skip to content

Commit 1751bbe

Browse files
authored
Merge pull request #3148 from sumitdaga/issue-3147
fix for issue #3147
2 parents 51f8078 + 380770c commit 1751bbe

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

src/projects/detail/components/Accordion/Accordion.jsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ import cn from 'classnames'
1111
import IconX from '../../../../assets/icons/ui-x-mark.svg'
1212
import IconCarretDown from '../../../../assets/icons/arrow-6px-carret-down-normal.svg'
1313

14+
import Tooltip from 'appirio-tech-react-components/components/Tooltip/Tooltip'
15+
import { TOOLTIP_DEFAULT_DELAY } from '../../../../config/constants'
16+
1417
import './Accordion.scss'
1518

1619
/**
@@ -132,7 +135,14 @@ class Accordion extends React.Component {
132135
return (
133136
<div styleName={cn('container', { 'is-open': isOpen })}>
134137
<button styleName="header" onClick={this.toggle}>
135-
<h5 styleName="title">{title}</h5>
138+
<Tooltip theme="light" tooltipDelay={TOOLTIP_DEFAULT_DELAY}>
139+
<div className="tooltip-target">
140+
<h5 styleName="title">{title}</h5>
141+
</div>
142+
<div className="tooltip-body">
143+
{title}
144+
</div>
145+
</Tooltip>
136146
<div styleName="value">{this.formatValue()}</div>
137147
<div styleName="toggle">
138148
{isOpen ? <IconX styleName="toggle-icon" /> : <IconCarretDown styleName="toggle-icon" />}

src/projects/detail/components/Accordion/Accordion.scss

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@
1919
display: none;
2020
}
2121

22+
:global .Tooltip {
23+
width: 180px;
24+
25+
.tooltip-target {
26+
cursor: pointer;
27+
}
28+
}
29+
2230
& + & {
2331
margin-top: 2 * $base-unit;
2432
}
@@ -40,7 +48,6 @@
4048

4149
.title {
4250
@include roboto-bold;
43-
flex: 0 0 180px;
4451
font-size: $tc-label-lg;
4552
overflow: hidden;
4653
padding: 0 2 * $base-unit;

0 commit comments

Comments
 (0)