@@ -28,14 +28,14 @@ export type DevtronLicenseCardProps = {
28
28
}
29
29
)
30
30
31
- export const getColorAccordingToStatus = ( licenseStatus : LicenseStatus ) => {
31
+ export const getColorAccordingToStatus = ( licenseStatus : LicenseStatus ) : { bgColor : string ; textColor : string } => {
32
32
switch ( licenseStatus ) {
33
33
case LicenseStatus . ACTIVE :
34
- return 'var(--G100)'
34
+ return { bgColor : 'var(--G100)' , textColor : 'var(--G500)' }
35
35
case LicenseStatus . REMINDER_THRESHOLD_REACHED :
36
- return 'var(--Y100)'
36
+ return { bgColor : 'var(--Y100)' , textColor : 'var(--Y700)' }
37
37
default :
38
- return 'var(--R100)'
38
+ return { bgColor : 'var(--R100)' , textColor : 'var(--R500)' }
39
39
}
40
40
}
41
41
@@ -49,31 +49,37 @@ export const DevtronLicenseCard = ({
49
49
// eslint-disable-next-line @typescript-eslint/no-unused-vars
50
50
ttl,
51
51
} : DevtronLicenseCardProps ) => {
52
- const colorValue = getColorAccordingToStatus ( licenseStatus )
52
+ const { bgColor , textColor } = getColorAccordingToStatus ( licenseStatus )
53
53
54
54
return (
55
- < div className = "flexbox-col p-8 br-16" style = { { backgroundColor : colorValue } } >
56
- < div className = "license-card flexbox-col dc__content-space br-12 p-20 h-200 bg__tertiary" >
57
- < div className = "flexbox dc__align-items-center dc__content-space" >
58
- < span className = "font-merriweather cn-9 fs-16 fw-7 lh-1-5" > { enterpriseName } </ span >
59
- < Icon name = "ic-devtron" color = "N900" size = { 24 } />
60
- </ div >
61
- < div className = "flexbox-col dc__gap-4" >
62
- < div className = "flexbox dc__align-items-center dc__gap-6" >
63
- < Icon name = "ic-key" color = { null } size = { 20 } />
64
- < div className = "flex dc__gap-4 cn-7 fs-16 fw-5 lh-1-5 font-ibm-plex-mono" >
65
- < span > ••••</ span >
66
- < span > { licenseSuffix || licenseKey . slice ( - 8 ) } </ span >
67
- </ div >
68
- { licenseKey && < ClipboardButton content = { licenseKey } /> }
55
+ < div className = "flexbox-col p-8 br-16" style = { { backgroundColor : bgColor } } >
56
+ < div className = "license-card br-12 h-200 bg__tertiary" >
57
+ < div className = "p-20 flexbox-col dc__content-space" >
58
+ < div className = "flexbox dc__align-items-center dc__content-space" >
59
+ < span className = "font-merriweather cn-9 fs-16 fw-7 lh-1-5" > { enterpriseName } </ span >
60
+ < Icon name = "ic-devtron" color = "N900" size = { 24 } />
69
61
</ div >
70
- < div className = "flexbox dc__align-items-center dc__gap-4" >
71
- < span > { expiryDate } </ span >
72
- < span > •</ span >
73
- < span style = { { color : colorValue } } > 2 months remaining</ span >
62
+ < div className = "flexbox-col dc__gap-4" >
63
+ < div className = "flexbox dc__align-items-center dc__gap-6" >
64
+ < Icon name = "ic-key" color = { null } size = { 20 } />
65
+ < div className = "flex dc__gap-4 cn-7 fs-16 fw-5 lh-1-5 font-ibm-plex-mono" >
66
+ < span > ••••</ span >
67
+ < span > { licenseSuffix || licenseKey . slice ( - 8 ) } </ span >
68
+ </ div >
69
+ { licenseKey && < ClipboardButton content = { licenseKey } /> }
70
+ </ div >
71
+ < div className = "flexbox dc__align-items-center dc__gap-4" >
72
+ < span > { expiryDate } </ span >
73
+ < span > •</ span >
74
+ < span style = { { color : textColor } } > 2 months remaining</ span >
75
+ </ div >
74
76
</ div >
75
77
</ div >
76
- { isTrial && < div className = "flexbox dc__align-items-center px-20 py-6" > TRIAL LICENSE</ div > }
78
+ { isTrial && (
79
+ < span className = "trial-license-badge flexbox dc__align-items-center px-20 py-6 cn-9 fs-11 fw-5 lh-1-5" >
80
+ TRIAL LICENSE
81
+ </ span >
82
+ ) }
77
83
</ div >
78
84
{ licenseStatus !== LicenseStatus . ACTIVE && (
79
85
< div className = "p-16 flexbox-col dc__gap-8" >
@@ -133,7 +139,7 @@ export const LicenseInfo = ({ handleUpdateLicenseClick }: { handleUpdateLicenseC
133
139
ttl = { 100 }
134
140
licenseStatus = { LicenseStatus . ACTIVE }
135
141
isTrial
136
- expiryDate = "2025-05-17 "
142
+ expiryDate = "17/05/2025 "
137
143
/>
138
144
< InstallationFingerprintInfo installationFingerprint = "3ff0d8be-e7f2-4bf4-9c3f-70ec904b51f4" showHelpTip />
139
145
< div className = "border__primary--bottom h-1" />
0 commit comments