File tree 3 files changed +37
-8
lines changed
site/src/components/WorkspaceScheduleButton
3 files changed +37
-8
lines changed Original file line number Diff line number Diff line change @@ -87,3 +87,11 @@ CannotEdit.args = {
87
87
} ,
88
88
canUpdateWorkspace : false ,
89
89
}
90
+
91
+ export const SmallViewport = Template . bind ( { } )
92
+ SmallViewport . args = {
93
+ ...WorkspaceOffShort . args ,
94
+ }
95
+ SmallViewport . parameters = {
96
+ chromatic : { viewports : [ 320 ] } ,
97
+ }
Original file line number Diff line number Diff line change @@ -140,6 +140,10 @@ const useStyles = makeStyles((theme) => ({
140
140
alignItems : "center" ,
141
141
border : `1px solid ${ theme . palette . divider } ` ,
142
142
borderRadius : `${ theme . shape . borderRadius } px` ,
143
+
144
+ [ theme . breakpoints . down ( "sm" ) ] : {
145
+ flexDirection : "column" ,
146
+ } ,
143
147
} ,
144
148
label : {
145
149
borderRight : 0 ,
@@ -150,18 +154,29 @@ const useStyles = makeStyles((theme) => ({
150
154
width : "100%" ,
151
155
display : "flex" ,
152
156
alignItems : "center" ,
157
+ padding : theme . spacing ( 1.5 , 2 ) ,
153
158
} ,
154
159
} ,
155
160
actions : {
156
161
[ theme . breakpoints . down ( "sm" ) ] : {
157
162
marginLeft : "auto" ,
163
+ display : "flex" ,
164
+ paddingLeft : theme . spacing ( 1 ) ,
165
+ marginRight : - theme . spacing ( 1 ) ,
158
166
} ,
159
167
} ,
160
168
scheduleButton : {
161
169
border : "none" ,
162
170
borderLeft : `1px solid ${ theme . palette . divider } ` ,
163
171
borderRadius : `0px ${ theme . shape . borderRadius } px ${ theme . shape . borderRadius } px 0px` ,
164
172
flexShrink : 0 ,
173
+
174
+ [ theme . breakpoints . down ( "sm" ) ] : {
175
+ width : "100%" ,
176
+ borderLeft : 0 ,
177
+ borderTop : `1px solid ${ theme . palette . divider } ` ,
178
+ borderRadius : `0 0 ${ theme . shape . borderRadius } px ${ theme . shape . borderRadius } px` ,
179
+ } ,
165
180
} ,
166
181
iconButton : {
167
182
borderRadius : 2 ,
Original file line number Diff line number Diff line change @@ -14,28 +14,34 @@ export const WorkspaceScheduleLabel: React.FC<{ workspace: Workspace }> = ({ wor
14
14
// If it is shutting down, we don't need to display the auto stop label
15
15
return (
16
16
< span className = { combineClasses ( [ styles . labelText , "chromatic-ignore" ] ) } >
17
- { shouldDisplayStrongLabel && (
18
- < strong className = { styles . labelStrong } > { Language . autoStopLabel } </ strong >
19
- ) }
20
- { stopLabel }
17
+ { shouldDisplayStrongLabel && < strong > { Language . autoStopLabel } </ strong > } { " " }
18
+ < span className = { styles . value } > { stopLabel } </ span >
21
19
</ span >
22
20
)
23
21
}
24
22
25
23
return (
26
24
< span className = { combineClasses ( [ styles . labelText , "chromatic-ignore" ] ) } >
27
- < strong className = { styles . labelStrong } > { Language . autoStartLabel } </ strong >
28
- { autoStartDisplay ( workspace . autostart_schedule ) }
25
+ < strong > { Language . autoStartLabel } </ strong > { " " }
26
+ < span className = { styles . value } > { autoStartDisplay ( workspace . autostart_schedule ) } </ span >
29
27
</ span >
30
28
)
31
29
}
32
30
33
31
const useStyles = makeStyles ( ( theme ) => ( {
34
32
labelText : {
35
33
marginRight : theme . spacing ( 2 ) ,
34
+ lineHeight : "160%" ,
35
+
36
+ [ theme . breakpoints . down ( "sm" ) ] : {
37
+ marginRight : 0 ,
38
+ width : "100%" ,
39
+ } ,
36
40
} ,
37
41
38
- labelStrong : {
39
- marginRight : theme . spacing ( 0.5 ) ,
42
+ value : {
43
+ [ theme . breakpoints . down ( "sm" ) ] : {
44
+ whiteSpace : "nowrap" ,
45
+ } ,
40
46
} ,
41
47
} ) )
You can’t perform that action at this time.
0 commit comments