@@ -135,17 +135,17 @@ export function ConfigMapManager({
135
135
} ;
136
136
137
137
return (
138
- < div className = "fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4" >
139
- < div className = "bg-white rounded-xl shadow-2xl w-full max-w-5xl max-h-[90vh] overflow-hidden flex flex-col" >
138
+ < div className = "fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4 dark:bg-opacity-80 " >
139
+ < div className = "bg-white rounded-xl shadow-2xl w-full max-w-5xl max-h-[90vh] overflow-hidden flex flex-col dark:bg-gray-900 " >
140
140
{ /* Header */ }
141
- < div className = "flex items-center justify-between p-6 border-b border-gray-200" >
141
+ < div className = "flex items-center justify-between p-6 border-b border-gray-200 dark:border-gray-700 " >
142
142
< div className = "flex items-center space-x-3" >
143
143
< div className = "w-10 h-10 bg-green-600 rounded-lg flex items-center justify-center" >
144
144
< FileText className = "w-6 h-6 text-white" />
145
145
</ div >
146
146
< div >
147
- < h3 className = "text-xl font-semibold text-gray-900" > ConfigMap Manager</ h3 >
148
- < p className = "text-sm text-gray-500" > Create and manage Kubernetes ConfigMaps</ p >
147
+ < h3 className = "text-xl font-semibold text-gray-900 dark:text-white " > ConfigMap Manager</ h3 >
148
+ < p className = "text-sm text-gray-500 dark:text-gray-400 " > Create and manage Kubernetes ConfigMaps</ p >
149
149
</ div >
150
150
</ div >
151
151
< button
@@ -161,19 +161,19 @@ export function ConfigMapManager({
161
161
< div className = "grid grid-cols-1 lg:grid-cols-2 gap-6 p-6" >
162
162
{ /* Create New ConfigMap */ }
163
163
< div className = "space-y-4" >
164
- < h4 className = "text-lg font-semibold text-gray-900" > Create New ConfigMap</ h4 >
164
+ < h4 className = "text-lg font-semibold text-gray-900 dark:text-white " > Create New ConfigMap</ h4 >
165
165
166
166
{ /* ConfigMap Name */ }
167
167
< div >
168
- < label className = "block text-sm font-medium text-gray-700 mb-2" >
168
+ < label className = "block text-sm font-medium text-gray-700 mb-2 dark:text-gray-300 " >
169
169
ConfigMap Name *
170
170
</ label >
171
171
< input
172
172
type = "text"
173
173
value = { newConfigMap . name }
174
174
onChange = { ( e ) => handleConfigMapNameChange ( e . target . value ) }
175
175
onKeyPress = { ( e ) => handleKeyPress ( e , handleCreateConfigMap ) }
176
- className = { `w-full px-3 py-2 border rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent ${
176
+ className = { `w-full px-3 py-2 border rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent dark:border-gray-600 dark:bg-gray-700 dark:text-white ${
177
177
errors . length > 0 ? 'border-red-300' : 'border-gray-300'
178
178
} `}
179
179
placeholder = "my-config"
@@ -192,13 +192,13 @@ export function ConfigMapManager({
192
192
193
193
{ /* Namespace */ }
194
194
< div >
195
- < label className = "block text-sm font-medium text-gray-700 mb-2" >
195
+ < label className = "block text-sm font-medium text-gray-700 mb-2 dark:text-gray-300 " >
196
196
Namespace
197
197
</ label >
198
198
< select
199
199
value = { newConfigMap . namespace }
200
200
onChange = { ( e ) => setNewConfigMap ( prev => ( { ...prev , namespace : e . target . value } ) ) }
201
- className = "w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent"
201
+ className = "w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent dark:border-gray-600 dark:bg-gray-700 dark:text-white "
202
202
>
203
203
{ namespaces . map ( namespace => (
204
204
< option key = { namespace } value = { namespace } >
@@ -211,7 +211,7 @@ export function ConfigMapManager({
211
211
{ /* Data Entries */ }
212
212
< div >
213
213
< div className = "flex items-center justify-between mb-3" >
214
- < label className = "block text-sm font-medium text-gray-700" >
214
+ < label className = "block text-sm font-medium text-gray-700 dark:text-gray-300 " >
215
215
Data *
216
216
</ label >
217
217
< button
@@ -229,13 +229,13 @@ export function ConfigMapManager({
229
229
value = { newDataEntry . key }
230
230
onChange = { ( e ) => setNewDataEntry ( prev => ( { ...prev , key : e . target . value } ) ) }
231
231
onKeyPress = { ( e ) => handleKeyPress ( e , addDataEntry ) }
232
- className = "flex-1 px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent"
232
+ className = "flex-1 px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent dark:border-gray-600 dark:bg-gray-700 dark:text-white "
233
233
placeholder = "config.properties"
234
234
/>
235
235
< textarea
236
236
value = { newDataEntry . value }
237
237
onChange = { ( e ) => setNewDataEntry ( prev => ( { ...prev , value : e . target . value } ) ) }
238
- className = "flex-1 px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent"
238
+ className = "flex-1 px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent dark:border-gray-600 dark:bg-gray-700 dark:text-white "
239
239
placeholder = "database.host=localhost"
240
240
rows = { 2 }
241
241
/>
@@ -244,10 +244,10 @@ export function ConfigMapManager({
244
244
{ Object . entries ( newConfigMap . data ) . length > 0 && (
245
245
< div className = "space-y-1 max-h-32 overflow-y-auto" >
246
246
{ Object . entries ( newConfigMap . data ) . map ( ( [ key , value ] ) => (
247
- < div key = { key } className = "flex items-start justify-between bg-gray-50 px-3 py-2 rounded-lg" >
247
+ < div key = { key } className = "flex items-start justify-between bg-gray-50 px-3 py-2 rounded-lg dark:bg-gray-700 " >
248
248
< div className = "min-w-0 flex-1" >
249
- < div className = "text-sm font-medium text-gray-900 truncate" > { key } </ div >
250
- < div className = "text-xs text-gray-600 truncate" > { value } </ div >
249
+ < div className = "text-sm font-medium text-gray-900 truncate dark:text-white " > { key } </ div >
250
+ < div className = "text-xs text-gray-600 truncate dark:text-gray-400 " > { value } </ div >
251
251
</ div >
252
252
< button
253
253
onClick = { ( ) => removeDataEntry ( key ) }
@@ -264,7 +264,7 @@ export function ConfigMapManager({
264
264
{ /* Labels */ }
265
265
< div >
266
266
< div className = "flex items-center justify-between mb-3" >
267
- < label className = "block text-sm font-medium text-gray-700" >
267
+ < label className = "block text-sm font-medium text-gray-700 dark:text-gray-300 " >
268
268
Labels (Optional)
269
269
</ label >
270
270
< button
@@ -282,24 +282,24 @@ export function ConfigMapManager({
282
282
value = { newLabel . key }
283
283
onChange = { ( e ) => setNewLabel ( prev => ( { ...prev , key : e . target . value } ) ) }
284
284
onKeyPress = { ( e ) => handleKeyPress ( e , addLabel ) }
285
- className = "flex-1 px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent"
285
+ className = "flex-1 px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent dark:border-gray-600 dark:bg-gray-700 dark:text-white "
286
286
placeholder = "key"
287
287
/>
288
288
< input
289
289
type = "text"
290
290
value = { newLabel . value }
291
291
onChange = { ( e ) => setNewLabel ( prev => ( { ...prev , value : e . target . value } ) ) }
292
292
onKeyPress = { ( e ) => handleKeyPress ( e , addLabel ) }
293
- className = "flex-1 px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent"
293
+ className = "flex-1 px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent dark:border-gray-600 dark:bg-gray-700 dark:text-white "
294
294
placeholder = "value"
295
295
/>
296
296
</ div >
297
297
298
298
{ Object . entries ( newConfigMap . labels ) . length > 0 && (
299
299
< div className = "space-y-1" >
300
300
{ Object . entries ( newConfigMap . labels ) . map ( ( [ key , value ] ) => (
301
- < div key = { key } className = "flex items-center justify-between bg-gray-50 px-3 py-2 rounded-lg" >
302
- < span className = "text-sm text-gray-900" >
301
+ < div key = { key } className = "flex items-center justify-between bg-gray-50 px-3 py-2 rounded-lg dark:bg-gray-700 " >
302
+ < span className = "text-sm text-gray-900 dark:text-white " >
303
303
< span className = "font-medium" > { key } </ span > : { value }
304
304
</ span >
305
305
< button
@@ -333,11 +333,11 @@ export function ConfigMapManager({
333
333
334
334
< div className = "space-y-2 max-h-96 overflow-y-auto" >
335
335
{ configMaps . map ( ( configMap ) => (
336
- < div key = { configMap . name } className = "bg-white rounded-lg p-4 border border-gray-200" >
336
+ < div key = { configMap . name } className = "bg-white rounded-lg p-4 border border-gray-200 dark:border-gray-700 dark:bg-gray-800 " >
337
337
< div className = "flex items-center justify-between mb-2" >
338
338
< div className = "flex items-center space-x-2" >
339
339
< FileText className = "w-4 h-4 text-green-600" />
340
- < span className = "font-medium text-gray-900" > { configMap . name } </ span >
340
+ < span className = "font-medium text-gray-900 dark:text-white " > { configMap . name } </ span >
341
341
< span className = "px-2 py-1 bg-green-100 text-green-800 rounded text-xs" >
342
342
{ configMap . namespace }
343
343
</ span >
@@ -370,23 +370,23 @@ export function ConfigMapManager({
370
370
</ div >
371
371
</ div >
372
372
373
- < div className = "text-xs text-gray-500 mb-2" >
373
+ < div className = "text-xs text-gray-500 mb-2 dark:text-gray-400 " >
374
374
Created: { new Date ( configMap . createdAt ) . toLocaleDateString ( ) }
375
375
</ div >
376
376
377
377
{ /* Data Preview */ }
378
378
{ Object . keys ( configMap . data ) . length > 0 && (
379
379
< div className = "mb-2" >
380
- < div className = "text-xs text-gray-600 mb-1" > Data ({ Object . keys ( configMap . data ) . length } entries):</ div >
380
+ < div className = "text-xs text-gray-600 mb-1 dark:text-gray-400 " > Data ({ Object . keys ( configMap . data ) . length } entries):</ div >
381
381
< div className = "space-y-1 max-h-20 overflow-y-auto" >
382
382
{ Object . entries ( configMap . data ) . slice ( 0 , 3 ) . map ( ( [ key , value ] ) => (
383
- < div key = { key } className = "bg-gray-50 px-2 py-1 rounded text-xs" >
384
- < span className = "font-medium text-gray-700" > { key } </ span >
385
- < div className = "text-gray-600 truncate" > { value } </ div >
383
+ < div key = { key } className = "bg-gray-50 px-2 py-1 rounded text-xs dark:bg-gray-700 " >
384
+ < span className = "font-medium text-gray-700 dark:text-white " > { key } </ span >
385
+ < div className = "text-gray-600 truncate dark:text-gray-400 " > { value } </ div >
386
386
</ div >
387
387
) ) }
388
388
{ Object . keys ( configMap . data ) . length > 3 && (
389
- < div className = "text-xs text-gray-500 text-center" >
389
+ < div className = "text-xs text-gray-500 text-center dark:text-gray-400 " >
390
390
+{ Object . keys ( configMap . data ) . length - 3 } more entries
391
391
</ div >
392
392
) }
@@ -397,10 +397,10 @@ export function ConfigMapManager({
397
397
{ /* Labels */ }
398
398
{ Object . keys ( configMap . labels ) . length > 0 && (
399
399
< div className = "mb-2" >
400
- < div className = "text-xs text-gray-600 mb-1" > Labels:</ div >
400
+ < div className = "text-xs text-gray-600 mb-1 dark:text-gray-400 " > Labels:</ div >
401
401
< div className = "flex flex-wrap gap-1" >
402
402
{ Object . entries ( configMap . labels ) . map ( ( [ key , value ] ) => (
403
- < span key = { key } className = "px-2 py-1 bg-blue-100 text-blue-800 rounded text-xs" >
403
+ < span key = { key } className = "px-2 py-1 bg-blue-100 text-blue-800 rounded text-xs dark:bg-blue-700 dark:text-white " >
404
404
{ key } : { value }
405
405
</ span >
406
406
) ) }
@@ -426,8 +426,8 @@ export function ConfigMapManager({
426
426
{ configMaps . length === 0 && (
427
427
< div className = "text-center py-8" >
428
428
< FileText className = "w-12 h-12 text-gray-400 mx-auto mb-4" />
429
- < h5 className = "text-lg font-medium text-gray-900 mb-2" > No ConfigMaps</ h5 >
430
- < p className = "text-sm text-gray-500" >
429
+ < h5 className = "text-lg font-medium text-gray-900 mb-2 dark:text-gray-100 " > No ConfigMaps</ h5 >
430
+ < p className = "text-sm text-gray-500 dark:text-gray-400 " >
431
431
Create your first ConfigMap to store configuration data
432
432
</ p >
433
433
</ div >
@@ -438,7 +438,7 @@ export function ConfigMapManager({
438
438
</ div >
439
439
440
440
{ /* Footer */ }
441
- < div className = "flex items-center justify-end p-6 border-t border-gray-200 bg-gray-50" >
441
+ < div className = "flex items-center justify-end p-6 border-t border-gray-200 bg-gray-50 dark:border-gray-700 dark:bg-gray-900 " >
442
442
< button
443
443
onClick = { onClose }
444
444
className = "px-6 py-2 text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50"
0 commit comments