@@ -15,7 +15,6 @@ import utc from "dayjs/plugin/utc"
15
15
import { useRef , useState } from "react"
16
16
import { Workspace } from "../../api/typesGenerated"
17
17
import { isWorkspaceOn } from "../../util/workspace"
18
- import { Stack } from "../Stack/Stack"
19
18
import { WorkspaceSchedule } from "../WorkspaceSchedule/WorkspaceSchedule"
20
19
import { WorkspaceScheduleLabel } from "./WorkspaceScheduleLabel"
21
20
@@ -28,6 +27,7 @@ dayjs.extend(relativeTime)
28
27
dayjs . extend ( timezone )
29
28
30
29
export const Language = {
30
+ schedule : "Schedule" ,
31
31
editDeadlineMinus : "Subtract one hour" ,
32
32
editDeadlinePlus : "Add one hour" ,
33
33
}
@@ -73,11 +73,11 @@ export const WorkspaceScheduleButton: React.FC<WorkspaceScheduleButtonProps> = (
73
73
}
74
74
75
75
return (
76
- < div className = { styles . wrapper } >
77
- < div className = { styles . label } >
76
+ < span className = { styles . wrapper } >
77
+ < span className = { styles . label } >
78
78
< WorkspaceScheduleLabel workspace = { workspace } />
79
79
{ canUpdateWorkspace && shouldDisplayPlusMinus ( workspace ) && (
80
- < Stack direction = "row" spacing = { 0 } >
80
+ < span >
81
81
< IconButton
82
82
className = { styles . iconButton }
83
83
size = "small"
@@ -98,18 +98,19 @@ export const WorkspaceScheduleButton: React.FC<WorkspaceScheduleButtonProps> = (
98
98
< AddIcon />
99
99
</ Tooltip >
100
100
</ IconButton >
101
- </ Stack >
101
+ </ span >
102
102
) }
103
- </ div >
104
- < div >
103
+ </ span >
104
+ < >
105
105
< Button
106
106
ref = { anchorRef }
107
107
startIcon = { < ScheduleIcon /> }
108
108
onClick = { ( ) => {
109
109
setIsOpen ( true )
110
110
} }
111
+ className = { styles . scheduleButton }
111
112
>
112
- Schedule
113
+ { Language . schedule }
113
114
</ Button >
114
115
< Popover
115
116
classes = { { paper : styles . popoverPaper } }
@@ -128,33 +129,33 @@ export const WorkspaceScheduleButton: React.FC<WorkspaceScheduleButtonProps> = (
128
129
>
129
130
< WorkspaceSchedule workspace = { workspace } canUpdateWorkspace = { canUpdateWorkspace } />
130
131
</ Popover >
131
- </ div >
132
- </ div >
132
+ </ >
133
+ </ span >
133
134
)
134
135
}
135
136
136
137
const useStyles = makeStyles ( ( theme ) => ( {
137
138
wrapper : {
138
- display : "flex" ,
139
- alignItems : "center" ,
139
+ display : "inline-block" ,
140
+ border : `1px solid ${ theme . palette . divider } ` ,
141
+ borderRadius : `${ theme . shape . borderRadius } px` ,
140
142
} ,
141
-
142
143
label : {
143
- border : `1px solid ${ theme . palette . divider } ` ,
144
144
borderRight : 0 ,
145
145
height : "100%" ,
146
- display : "flex" ,
147
- alignItems : "center" ,
148
146
padding : "0 8px 0 16px" ,
149
147
color : theme . palette . text . secondary ,
150
148
// It is from the button props
151
149
minHeight : 42 ,
152
150
} ,
153
-
151
+ scheduleButton : {
152
+ border : "none" ,
153
+ borderLeft : `1px solid ${ theme . palette . divider } ` ,
154
+ borderRadius : `0px ${ theme . shape . borderRadius } px ${ theme . shape . borderRadius } px 0px` ,
155
+ } ,
154
156
iconButton : {
155
157
borderRadius : 2 ,
156
158
} ,
157
-
158
159
popoverPaper : {
159
160
padding : `${ theme . spacing ( 2 ) } px ${ theme . spacing ( 3 ) } px ${ theme . spacing ( 3 ) } px` ,
160
161
} ,
0 commit comments