File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 14
14
* limitations under the License.
15
15
*/
16
16
17
+ import { Tippy } from '..'
17
18
import { ReactComponent as SortIcon } from '../../Assets/Icon/ic-arrow-up-down.svg'
18
19
import { ReactComponent as SortArrowDown } from '../../Assets/Icon/ic-sort-arrow-down.svg'
19
20
import { SortingOrder } from '../Constants'
@@ -41,6 +42,7 @@ const SortableTableHeaderCell = ({
41
42
title,
42
43
disabled,
43
44
isSortable = true ,
45
+ showTippyOnTruncate = false ,
44
46
} : SortableTableHeaderCellProps ) => {
45
47
const renderSortIcon = ( ) => {
46
48
if ( ! isSortable ) {
@@ -65,7 +67,15 @@ const SortableTableHeaderCell = ({
65
67
onClick = { isSortable ? triggerSorting : noop }
66
68
disabled = { disabled }
67
69
>
68
- < span className = "dc__uppercase dc__ellipsis-right" > { title } </ span >
70
+ < Tippy
71
+ showOnTruncate = { showTippyOnTruncate }
72
+ className = "default-tt"
73
+ placement = "top"
74
+ arrow = { false }
75
+ content = { title }
76
+ >
77
+ < span className = "dc__uppercase dc__ellipsis-right" > { title } </ span >
78
+ </ Tippy >
69
79
{ renderSortIcon ( ) }
70
80
</ button >
71
81
)
Original file line number Diff line number Diff line change @@ -44,4 +44,5 @@ export interface SortableTableHeaderCellProps {
44
44
* @default true
45
45
*/
46
46
isSortable ?: boolean
47
+ showTippyOnTruncate ?: boolean
47
48
}
You can’t perform that action at this time.
0 commit comments