File tree Expand file tree Collapse file tree 3 files changed +42
-7
lines changed
workspaces/WorkspaceAppStatus Expand file tree Collapse file tree 3 files changed +42
-7
lines changed Original file line number Diff line number Diff line change @@ -24,16 +24,21 @@ export const AppStatusStateIcon: FC<AppStatusStateIconProps> = ({
24
24
latest,
25
25
className : customClassName ,
26
26
} ) => {
27
- const className = cn ( [ "size-4 shrink-0" , customClassName ] ) ;
27
+ const className = cn ( [
28
+ "size-4 shrink-0" ,
29
+ customClassName ,
30
+ disabled && "text-content-disabled" ,
31
+ ] ) ;
28
32
29
33
switch ( state ) {
30
34
case "idle" :
31
35
return (
32
36
< PauseIcon
33
37
className = { cn ( [
34
38
"text-content-secondary" ,
35
- "fill-content-secondary" ,
36
39
className ,
40
+ // The pause icon is outlined; add a fill since it is hard to see.
41
+ disabled ? "fill-content-disabled" : "fill-content-secondary" ,
37
42
] ) }
38
43
/>
39
44
) ;
Original file line number Diff line number Diff line change @@ -69,9 +69,43 @@ export const LongMessage: Story = {
69
69
} ,
70
70
} ;
71
71
72
- export const Disabled : Story = {
72
+ export const DisabledComplete : Story = {
73
73
args : {
74
74
status : MockWorkspaceAppStatus ,
75
75
disabled : true ,
76
76
} ,
77
77
} ;
78
+
79
+ export const DisabledFailure : Story = {
80
+ args : {
81
+ status : {
82
+ ...MockWorkspaceAppStatus ,
83
+ state : "failure" ,
84
+ message : "Couldn't figure out how to start the dev server" ,
85
+ } ,
86
+ disabled : true ,
87
+ } ,
88
+ } ;
89
+
90
+ export const DisabledWorking : Story = {
91
+ args : {
92
+ status : {
93
+ ...MockWorkspaceAppStatus ,
94
+ state : "working" ,
95
+ message : "Starting dev server..." ,
96
+ uri : "" ,
97
+ } ,
98
+ disabled : true ,
99
+ } ,
100
+ } ;
101
+
102
+ export const DisabledIdle : Story = {
103
+ args : {
104
+ status : {
105
+ ...MockWorkspaceAppStatus ,
106
+ state : "idle" ,
107
+ message : "Done for now" ,
108
+ } ,
109
+ disabled : true ,
110
+ } ,
111
+ } ;
Original file line number Diff line number Diff line change 7
7
} from "components/Tooltip/Tooltip" ;
8
8
import capitalize from "lodash/capitalize" ;
9
9
import { AppStatusStateIcon } from "modules/apps/AppStatusStateIcon" ;
10
- import { cn } from "utils/cn" ;
11
10
12
11
type WorkspaceAppStatusProps = {
13
12
status : APIWorkspaceAppStatus | null ;
@@ -37,9 +36,6 @@ export const WorkspaceAppStatus = ({
37
36
latest
38
37
disabled = { disabled }
39
38
state = { status . state }
40
- className = { cn ( {
41
- "text-content-disabled" : disabled ,
42
- } ) }
43
39
/>
44
40
< span className = "whitespace-nowrap max-w-72 overflow-hidden text-ellipsis text-sm text-content-primary font-medium" >
45
41
{ message }
You can’t perform that action at this time.
0 commit comments