File tree Expand file tree Collapse file tree 6 files changed +13
-2
lines changed Expand file tree Collapse file tree 6 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @devtron-labs/devtron-fe-common-lib" ,
3
- "version" : " 1.9.8-beta-8 " ,
3
+ "version" : " 1.9.8-beta-9 " ,
4
4
"description" : " Supporting common component library" ,
5
5
"type" : " module" ,
6
6
"main" : " dist/index.js" ,
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ export const ClipboardButton = ({
36
36
copyToClipboardPromise,
37
37
rootClassName = '' ,
38
38
iconSize = 16 ,
39
+ onClick,
39
40
} : ClipboardProps ) => {
40
41
const [ copied , setCopied ] = useState < boolean > ( false )
41
42
const setCopiedFalseTimeoutRef = useRef < ReturnType < typeof setTimeout > > ( - 1 )
@@ -69,6 +70,7 @@ export const ClipboardButton = ({
69
70
stopPropagation ( e )
70
71
}
71
72
73
+ onClick ?.( )
72
74
await handleAwaitCopyToClipboardPromise ( true )
73
75
}
74
76
@@ -97,6 +99,7 @@ export const ClipboardButton = ({
97
99
< button
98
100
type = "button"
99
101
className = { `dc__outline-none-imp p-0 flex dc__transparent--unstyled dc__no-border ${ rootClassName } ` }
102
+ aria-label = { `Copy ${ content } ` }
100
103
onClick = { handleCopyContent }
101
104
>
102
105
< Tooltip content = { copiedTippyText } alwaysShowTippyOnHover visible = { copied } >
Original file line number Diff line number Diff line change @@ -21,4 +21,5 @@ export default interface ClipboardProps {
21
21
copyToClipboardPromise ?: Promise < void >
22
22
rootClassName ?: string
23
23
iconSize ?: number
24
+ onClick ?: ( ) => void
24
25
}
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ export const DevtronLicenseCard = ({
26
26
isTrial,
27
27
ttl,
28
28
appTheme,
29
+ onCopyButtonClick,
29
30
} : DevtronLicenseCardProps ) => {
30
31
const { bgColor, textColor } = getLicenseColorsAccordingToStatus ( licenseStatus )
31
32
const remainingTime = getTTLInHumanReadableFormat ( ttl )
@@ -104,7 +105,7 @@ export const DevtronLicenseCard = ({
104
105
< span > ••••</ span >
105
106
< span > { licenseSuffix || licenseKey ?. slice ( - 8 ) } </ span >
106
107
</ div >
107
- { licenseKey && < ClipboardButton content = { licenseKey } /> }
108
+ { licenseKey && < ClipboardButton content = { licenseKey } onClick = { onCopyButtonClick } /> }
108
109
</ div >
109
110
< div className = "flexbox dc__align-items-center dc__gap-4 flex-wrap" >
110
111
< span className = "font-ibm-plex-mono cn-9" > { expiryDate } </ span >
Original file line number Diff line number Diff line change @@ -16,10 +16,12 @@ export type DevtronLicenseCardProps = {
16
16
} & (
17
17
| {
18
18
licenseKey : string
19
+ onCopyButtonClick ?: ( ) => void
19
20
licenseSuffix ?: never
20
21
}
21
22
| {
22
23
licenseKey ?: never
24
+ onCopyButtonClick ?: never
23
25
licenseSuffix : string
24
26
}
25
27
)
Original file line number Diff line number Diff line change @@ -90,6 +90,10 @@ const HelpNav = ({
90
90
}
91
91
92
92
const handleOpenLicenseDialog = ( ) => {
93
+ ReactGA . event ( {
94
+ category : 'help-nav__about-devtron' ,
95
+ action : 'ABOUT_DEVTRON_CLICKED' ,
96
+ } )
93
97
handleOpenLicenseInfoDialog ( )
94
98
}
95
99
You can’t perform that action at this time.
0 commit comments