@@ -72,53 +72,6 @@ const bannerStyles = css({
72
72
textAlign : 'left' ,
73
73
} ) ;
74
74
75
- // TODO: The LG MarketingModal does not provide a way to disable the button
76
- // so this is a temporary workaround to make the button look disabled.
77
- const leafyGreenButtonSelector =
78
- 'button[data-lgid="lg-button"]:not([aria-label="Close modal"])' ;
79
- const focusSelector = `&:focus-visible, &[data-focus="true"]` ;
80
- const hoverSelector = `&:hover, &[data-hover="true"]` ;
81
- const activeSelector = `&:active, &[data-active="true"]` ;
82
- const focusBoxShadow = ( color : string ) => `
83
- 0 0 0 2px ${ color } ,
84
- 0 0 0 4px ${ palette . blue . light1 } ;
85
- ` ;
86
- const disabledButtonStyles : Record < Theme , string > = {
87
- [ Theme . Light ] : css ( {
88
- [ leafyGreenButtonSelector ] : {
89
- [ `&, ${ hoverSelector } , ${ activeSelector } ` ] : {
90
- backgroundColor : palette . gray . light2 ,
91
- borderColor : palette . gray . light1 ,
92
- color : palette . gray . base ,
93
- boxShadow : 'none' ,
94
- cursor : 'not-allowed' ,
95
- } ,
96
-
97
- [ focusSelector ] : {
98
- color : palette . gray . base ,
99
- boxShadow : focusBoxShadow ( palette . white ) ,
100
- } ,
101
- } ,
102
- } ) ,
103
-
104
- [ Theme . Dark ] : css ( {
105
- [ leafyGreenButtonSelector ] : {
106
- [ `&, ${ hoverSelector } , ${ activeSelector } ` ] : {
107
- backgroundColor : palette . gray . dark3 ,
108
- borderColor : palette . gray . dark2 ,
109
- color : palette . gray . dark1 ,
110
- boxShadow : 'none' ,
111
- cursor : 'not-allowed' ,
112
- } ,
113
-
114
- [ focusSelector ] : {
115
- color : palette . gray . dark1 ,
116
- boxShadow : focusBoxShadow ( palette . black ) ,
117
- } ,
118
- } ,
119
- } ) ,
120
- } ;
121
-
122
75
const CloudAIOptInBannerContent : React . FunctionComponent < {
123
76
isProjectAIEnabled : boolean ;
124
77
isSampleDocumentPassingEnabled : boolean ;
@@ -178,8 +131,6 @@ export const AIOptInModal: React.FunctionComponent<OptInModalProps> = ({
178
131
) ;
179
132
const track = useTelemetry ( ) ;
180
133
const darkMode = useDarkMode ( ) ;
181
- const currentDisabledButtonStyles =
182
- disabledButtonStyles [ darkMode ? Theme . Dark : Theme . Light ] ;
183
134
184
135
useEffect ( ( ) => {
185
136
if ( isOptInModalVisible ) {
@@ -206,13 +157,10 @@ export const AIOptInModal: React.FunctionComponent<OptInModalProps> = ({
206
157
title = { `Use AI Features in ${ isCloudOptIn ? 'Data Explorer' : 'Compass' } ` }
207
158
open = { isOptInModalVisible }
208
159
onClose = { handleModalClose }
209
- // TODO Button Disabling
210
- backdropClassName = {
211
- ! isProjectAIEnabled ? currentDisabledButtonStyles : undefined
212
- }
213
160
buttonProps = { {
214
161
children : 'Use AI Features' ,
215
162
onClick : onConfirmClick ,
163
+ disabled : ! isProjectAIEnabled ,
216
164
} }
217
165
linkText = "Not now"
218
166
onLinkClick = { onOptInModalClose }
0 commit comments