@@ -20,14 +20,18 @@ export interface WorkspaceQuotaProps {
20
20
export const WorkspaceQuota : FC < WorkspaceQuotaProps > = ( { quota } ) => {
21
21
const styles = useStyles ( )
22
22
quota = {
23
- count : 1 ,
24
- limit : 10 ,
23
+ count : 3 ,
24
+ limit : 3 ,
25
25
}
26
+ // quota = undefined
26
27
// loading state
27
28
if ( quota === undefined ) {
28
29
return (
29
30
< Box >
30
31
< Stack spacing = { 1 } className = { styles . stack } >
32
+ < span className = { styles . title } >
33
+ Workspace Quota
34
+ </ span >
31
35
< LinearProgress color = "primary" />
32
36
< div className = { styles . label } >
33
37
< Skeleton className = { styles . skeleton } />
@@ -48,10 +52,14 @@ export const WorkspaceQuota: FC<WorkspaceQuotaProps> = ({ quota }) => {
48
52
value = 1
49
53
}
50
54
55
+
51
56
return (
52
57
< Box >
53
58
< Stack spacing = { 1 } className = { styles . stack } >
54
- < LinearProgress value = { value } variant = "determinate" color = "primary" />
59
+ < span className = { styles . title } >
60
+ Workspace Quota
61
+ </ span >
62
+ < LinearProgress className = { quota . count >= quota . limit ? styles . maxProgress : undefined } value = { value } variant = "determinate" />
55
63
< div className = { styles . label } >
56
64
{ quota . count } { Language . of } { quota . limit } { " " }
57
65
{ quota . limit === 1 ? Language . workspace : Language . workspaces } { " used" }
@@ -65,6 +73,19 @@ const useStyles = makeStyles((theme) => ({
65
73
stack : {
66
74
paddingTop : theme . spacing ( 2.5 ) ,
67
75
} ,
76
+ maxProgress : {
77
+ "& .MuiLinearProgress-colorPrimary" : {
78
+ backgroundColor : theme . palette . error . main ,
79
+ } ,
80
+ "& .MuiLinearProgress-barColorPrimary" : {
81
+ backgroundColor : theme . palette . error . main ,
82
+ } ,
83
+ } ,
84
+ title : {
85
+ fontFamily : MONOSPACE_FONT_FAMILY ,
86
+ fontSize : 21 ,
87
+ paddingBottom : "8px" ,
88
+ } ,
68
89
label : {
69
90
fontFamily : MONOSPACE_FONT_FAMILY ,
70
91
fontSize : 12 ,
0 commit comments