1
- import type { CSSInterpolation } from "@emotion/css/dist/declarations/src/create-instance" ;
2
1
import { css , type Interpolation , type Theme , useTheme } from "@emotion/react" ;
3
2
import Button from "@mui/material/Button" ;
4
3
import Link from "@mui/material/Link" ;
@@ -15,7 +14,6 @@ import { TerminalIcon } from "components/Icons/TerminalIcon";
15
14
import { VSCodeIcon } from "components/Icons/VSCodeIcon" ;
16
15
import { Stack } from "components/Stack/Stack" ;
17
16
import dayjs from "dayjs" ;
18
- import { type ClassName , useClassName } from "hooks/useClassName" ;
19
17
import {
20
18
AppWindowIcon ,
21
19
CircleAlertIcon ,
@@ -53,7 +51,6 @@ export const DeploymentBannerView: FC<DeploymentBannerViewProps> = ({
53
51
fetchStats,
54
52
} ) => {
55
53
const theme = useTheme ( ) ;
56
- const summaryTooltip = useClassName ( classNames . summaryTooltip , [ ] ) ;
57
54
58
55
const aggregatedMinutes = useMemo ( ( ) => {
59
56
if ( ! stats ) {
@@ -128,7 +125,10 @@ export const DeploymentBannerView: FC<DeploymentBannerViewProps> = ({
128
125
} }
129
126
>
130
127
< Tooltip
131
- classes = { { tooltip : summaryTooltip } }
128
+ classes = { {
129
+ tooltip :
130
+ "ml-3 mb-1 w-[400px] p-4 text-sm text-content-primary bg-surface-secondary border border-solid border-border pointer-events-none" ,
131
+ } }
132
132
title = {
133
133
healthErrors . length > 0 ? (
134
134
< >
@@ -236,10 +236,10 @@ export const DeploymentBannerView: FC<DeploymentBannerViewProps> = ({
236
236
< div css = { styles . value } >
237
237
< VSCodeIcon
238
238
css = { css `
239
- & * {
240
- fill : currentColor;
241
- }
242
- `}
239
+ & * {
240
+ fill : currentColor;
241
+ }
242
+ `}
243
243
/>
244
244
{ typeof stats ?. session_count . vscode === "undefined"
245
245
? "-"
@@ -251,10 +251,10 @@ export const DeploymentBannerView: FC<DeploymentBannerViewProps> = ({
251
251
< div css = { styles . value } >
252
252
< JetBrainsIcon
253
253
css = { css `
254
- & * {
255
- fill : currentColor;
256
- }
257
- `}
254
+ & * {
255
+ fill : currentColor;
256
+ }
257
+ `}
258
258
/>
259
259
{ typeof stats ?. session_count . jetbrains === "undefined"
260
260
? "-"
@@ -303,20 +303,20 @@ export const DeploymentBannerView: FC<DeploymentBannerViewProps> = ({
303
303
css = { [
304
304
styles . value ,
305
305
css `
306
- margin : 0 ;
307
- padding : 0 8px ;
308
- height : unset;
309
- min-height : unset;
310
- font-size : unset;
311
- color : unset;
312
- border : 0 ;
313
- min-width : unset;
314
- font-family : inherit;
306
+ margin : 0 ;
307
+ padding : 0 8px ;
308
+ height : unset;
309
+ min-height : unset;
310
+ font-size : unset;
311
+ color : unset;
312
+ border : 0 ;
313
+ min-width : unset;
314
+ font-family : inherit;
315
315
316
- & svg {
317
- margin-right : 4px ;
318
- }
319
- `,
316
+ & svg {
317
+ margin-right : 4px ;
318
+ }
319
+ `,
320
320
] }
321
321
onClick = { ( ) => {
322
322
if ( fetchStats ) {
@@ -410,41 +410,27 @@ const getHealthErrors = (health: HealthcheckReport) => {
410
410
return warnings ;
411
411
} ;
412
412
413
- const classNames = {
414
- summaryTooltip : ( css , theme ) => css `
415
- ${ theme . typography . body2 as CSSInterpolation }
416
-
417
- margin : 0 0 4px 12px ;
418
- width : 400px ;
419
- padding : 16px ;
420
- color : ${ theme . palette . text . primary } ;
421
- background-color : ${ theme . palette . background . paper } ;
422
- border : 1px solid ${ theme . palette . divider } ;
423
- pointer-events : none;
424
- ` ,
425
- } satisfies Record < string , ClassName > ;
426
-
427
413
const styles = {
428
414
statusBadge : ( theme ) => css `
429
- display : flex;
430
- align-items : center;
431
- justify-content : center;
432
- padding : 0 12px ;
433
- height : 100% ;
434
- color : ${ theme . experimental . l1 . text } ;
415
+ display : flex;
416
+ align-items : center;
417
+ justify-content : center;
418
+ padding : 0 12px ;
419
+ height : 100% ;
420
+ color : ${ theme . experimental . l1 . text } ;
435
421
436
- & svg {
437
- width : 16px ;
438
- height : 16px ;
439
- }
440
- `,
422
+ & svg {
423
+ width : 16px ;
424
+ height : 16px ;
425
+ }
426
+ `,
441
427
unhealthy : {
442
428
backgroundColor : colors . red [ 700 ] ,
443
429
} ,
444
430
group : css `
445
- display : flex;
446
- align-items : center;
447
- `,
431
+ display : flex;
432
+ align-items : center;
433
+ `,
448
434
category : ( theme ) => ( {
449
435
marginRight : 16 ,
450
436
color : theme . palette . text . primary ,
@@ -455,15 +441,15 @@ const styles = {
455
441
color : theme . palette . text . secondary ,
456
442
} ) ,
457
443
value : css `
458
- display : flex;
459
- align-items : center;
460
- gap : 4px ;
444
+ display : flex;
445
+ align-items : center;
446
+ gap : 4px ;
461
447
462
- & svg {
463
- width : 12px ;
464
- height : 12px ;
465
- }
466
- `,
448
+ & svg {
449
+ width : 12px ;
450
+ height : 12px ;
451
+ }
452
+ `,
467
453
separator : ( theme ) => ( {
468
454
color : theme . palette . text . disabled ,
469
455
} ) ,
0 commit comments