@@ -4,6 +4,7 @@ import { ClipboardButton, getTTLInHumanReadableFormat } from '@Common/index'
4
4
import { ReactComponent as ICChatSupport } from '@IconsV2/ic-chat-circle-dots.svg'
5
5
import { getThemeOppositeThemeClass } from '@Shared/Providers/ThemeProvider/utils'
6
6
import {
7
+ AppThemeType ,
7
8
CONTACT_SUPPORT_LINK ,
8
9
DevtronLicenseCardProps ,
9
10
ENTERPRISE_SUPPORT_LINK ,
@@ -31,6 +32,7 @@ export const DevtronLicenseCard = ({
31
32
const remainingTime = getTTLInHumanReadableFormat ( ttl )
32
33
const remainingTimeString = ttl < 0 ? `Expired ${ remainingTime } ago` : `${ remainingTime } remaining`
33
34
const isLicenseValid = licenseStatus !== LicenseStatus . EXPIRED
35
+ const isThemeDark = appTheme === AppThemeType . dark
34
36
35
37
const cardRef = useRef < HTMLDivElement > ( null )
36
38
@@ -69,12 +71,10 @@ export const DevtronLicenseCard = ({
69
71
)
70
72
const sheenPosition = useTransform ( diagonalMovement , [ - 5 , 5 ] , [ - 100 , 200 ] )
71
73
72
- const sheenOpacity = useTransform ( sheenPosition , [ - 100 , 50 , 200 ] , [ 0 , 0.05 , 0 ] )
73
- const sheenGradient = useMotionTemplate `linear-gradient(
74
- 55deg,
75
- transparent,
76
- rgba(255 255 255 / ${ sheenOpacity } ) ${ sheenPosition } %,
77
- transparent)`
74
+ const sheenOpacity = useTransform ( sheenPosition , [ - 100 , 50 , 200 ] , [ 0 , isThemeDark ? 0.25 : 0.1 , 0 ] )
75
+ const sheenGradient = isThemeDark
76
+ ? useMotionTemplate `linear-gradient(55deg, transparent, rgba(122, 127, 131, ${ sheenOpacity } ) ${ sheenPosition } %, transparent)`
77
+ : useMotionTemplate `linear-gradient(55deg, transparent, rgba(255, 255, 255, ${ sheenOpacity } ) ${ sheenPosition } %, transparent)`
78
78
79
79
return (
80
80
< div className = "flexbox-col p-8 br-16" style = { { backgroundColor : bgColor } } >
0 commit comments