1
1
import { cloneElement } from 'react'
2
2
import { Link } from 'react-router-dom'
3
+ import { ReactComponent as ICCaretSmall } from '@Icons/ic-caret-left-small.svg'
4
+ import { Tooltip } from '@Common/Tooltip'
3
5
import { GenericInfoCardProps } from './types'
4
6
import { getClassNameForBorderVariant } from './utils'
7
+ import './styles.scss'
5
8
6
9
const GenericInfoCard = ( {
7
10
title,
@@ -22,7 +25,7 @@ const GenericInfoCard = ({
22
25
</ div >
23
26
24
27
< div className = "flexbox-col dc__gap-8 flex-grow-1" >
25
- < div className = "flexbox-col dc__gap-2 " >
28
+ < div className = "flexbox-col dc__gap-4 " >
26
29
< span className = { isLoading ? 'shimmer w-300' : '' } />
27
30
< span className = { isLoading ? 'shimmer w-150 pt-2' : '' } />
28
31
</ div >
@@ -33,7 +36,9 @@ const GenericInfoCard = ({
33
36
)
34
37
35
38
const renderContent = ( ) => (
36
- < div className = { `flexbox dc__gap-16 p-12 bg__primary ${ getClassNameForBorderVariant ( borderVariant ) } ` } >
39
+ < div
40
+ className = { `flexbox dc__gap-16 p-12 bg__primary generic-info-card br-8 ${ getClassNameForBorderVariant ( borderVariant ) } ` }
41
+ >
37
42
{ isLoading ? (
38
43
renderShimmerContent ( )
39
44
) : (
@@ -44,11 +49,24 @@ const GenericInfoCard = ({
44
49
45
50
< div className = "flexbox-col dc__gap-8 flex-grow-1" >
46
51
< div className = "flexbox-col" >
47
- < h3 className = "fw-6 fs-13 lh-20 cn-9 m-0" > { title } </ h3 >
48
- < h4 className = "fw-4 fs-12 lh-16 cn-7 m-0" > By { author } </ h4 >
52
+ < div className = "flexbox dc__align-items-center" >
53
+ < Tooltip content = { title } >
54
+ < h3 className = "fw-6 fs-13 lh-20 cn-9 m-0 generic-info-card__title dc__truncate dc__mxw-600" >
55
+ { title }
56
+ </ h3 >
57
+ </ Tooltip >
58
+
59
+ < div className = "generic-info-card__arrow dc__no-shrink flex" >
60
+ < ICCaretSmall className = "icon-dim-16 dc__flip-180 scb-5" />
61
+ </ div >
62
+ </ div >
63
+
64
+ < Tooltip content = { author } >
65
+ < h4 className = "fw-4 fs-12 lh-16 cn-7 m-0 dc__truncate w-300" > By { author } </ h4 >
66
+ </ Tooltip >
49
67
</ div >
50
68
51
- < p className = "fw-4 fs-12 lh-16 cn-7 m-0" > { description } </ p >
69
+ < p className = "fw-4 fs-12 lh-16 cn-7 m-0 dc__truncate--clamp-3 " > { description } </ p >
52
70
</ div >
53
71
</ >
54
72
) }
@@ -64,9 +82,9 @@ const GenericInfoCard = ({
64
82
}
65
83
66
84
return (
67
- < button type = "button" onClick = { onClick } className = "dc__unset-button-styles" >
85
+ < div role = "button" tabIndex = { 0 } onClick = { onClick } className = "dc__unset-button-styles dc__align-unset " >
68
86
{ renderContent ( ) }
69
- </ button >
87
+ </ div >
70
88
)
71
89
}
72
90
0 commit comments