File tree Expand file tree Collapse file tree 5 files changed +14
-30
lines changed Expand file tree Collapse file tree 5 files changed +14
-30
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ import { ReactComponent as Check } from '../../Assets/Icon/ic-check.svg'
31
31
*/
32
32
export const ClipboardButton = ( {
33
33
content,
34
+ initialTippyText = 'Copy' ,
34
35
copiedTippyText = 'Copied!' ,
35
36
duration = 1000 ,
36
37
copyToClipboardPromise,
@@ -94,19 +95,17 @@ export const ClipboardButton = ({
94
95
const iconClassName = `icon-dim-${ iconSize } dc__no-shrink`
95
96
96
97
return (
97
- < Tooltip content = "Copy" alwaysShowTippyOnHover = { ! copied } >
98
+ < Tooltip content = { copied ? copiedTippyText : initialTippyText } alwaysShowTippyOnHover >
98
99
{ /* TODO: semantically buttons should not be nested; fix later */ }
99
100
< button
100
101
type = "button"
101
102
className = { `dc__outline-none-imp p-0 flex dc__transparent--unstyled dc__no-border ${ rootClassName } ` }
102
103
aria-label = { `Copy ${ content } ` }
103
104
onClick = { handleCopyContent }
104
105
>
105
- < Tooltip content = { copiedTippyText } alwaysShowTippyOnHover visible = { copied } >
106
- < div className = "flex" >
107
- { copied ? < Check className = { iconClassName } /> : < ICCopy className = { iconClassName } /> }
108
- </ div >
109
- </ Tooltip >
106
+ < div className = "flex" >
107
+ { copied ? < Check className = { iconClassName } /> : < ICCopy className = { iconClassName } /> }
108
+ </ div >
110
109
</ button >
111
110
</ Tooltip >
112
111
)
Original file line number Diff line number Diff line change 16
16
17
17
export default interface ClipboardProps {
18
18
content : string
19
+ initialTippyText ?: string
19
20
copiedTippyText ?: string
20
21
duration ?: number
21
22
copyToClipboardPromise ?: Promise < void >
Original file line number Diff line number Diff line change @@ -101,12 +101,17 @@ export const DevtronLicenseCard = ({
101
101
</ div >
102
102
< div className = "flexbox-col dc__gap-2" >
103
103
< div className = "flexbox dc__align-items-center dc__gap-6" >
104
- < Icon name = "ic-key" color = "N900" size = { 16 } />
105
- < div className = "flex dc__gap-4 cn-7 fs-16 fw-5 lh-1-5 cn-9 font-ibm-plex-mono" >
104
+ < div className = "flex dc__gap-2 cn-7 fs-16 fw-5 lh-1-5 cn-9 font-ibm-plex-mono" >
106
105
< span > ••••</ span >
107
106
< span > { licenseSuffix || licenseKey ?. slice ( - 8 ) } </ span >
108
107
</ div >
109
- { licenseKey && < ClipboardButton content = { licenseKey } onClick = { onCopyButtonClick } /> }
108
+ { licenseKey && (
109
+ < ClipboardButton
110
+ initialTippyText = "Copy license key"
111
+ content = { licenseKey }
112
+ onClick = { onCopyButtonClick }
113
+ />
114
+ ) }
110
115
</ div >
111
116
< div className = "flexbox dc__align-items-center dc__gap-4 flex-wrap fs-12" >
112
117
< span className = "font-ibm-plex-mono cn-9" > { expiryDate } </ span >
Original file line number Diff line number Diff line change @@ -58,7 +58,6 @@ import { ReactComponent as ICInfoFilled } from '@IconsV2/ic-info-filled.svg'
58
58
import { ReactComponent as ICInfoOutline } from '@IconsV2/ic-info-outline.svg'
59
59
import { ReactComponent as ICJobColor } from '@IconsV2/ic-job-color.svg'
60
60
import { ReactComponent as ICK8sJob } from '@IconsV2/ic-k8s-job.svg'
61
- import { ReactComponent as ICKey } from '@IconsV2/ic-key.svg'
62
61
import { ReactComponent as ICLdap } from '@IconsV2/ic-ldap.svg'
63
62
import { ReactComponent as ICLivspace } from '@IconsV2/ic-livspace.svg'
64
63
import { ReactComponent as ICLoginDevtronLogo } from '@IconsV2/ic-login-devtron-logo.svg'
@@ -153,7 +152,6 @@ export const iconMap = {
153
152
'ic-info-outline' : ICInfoOutline ,
154
153
'ic-job-color' : ICJobColor ,
155
154
'ic-k8s-job' : ICK8sJob ,
156
- 'ic-key' : ICKey ,
157
155
'ic-ldap' : ICLdap ,
158
156
'ic-livspace' : ICLivspace ,
159
157
'ic-login-devtron-logo' : ICLoginDevtronLogo ,
You can’t perform that action at this time.
0 commit comments